perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Cass" <ian.c...@mblox.com>
Subject Re: Switch.pm not working under Apache::ASP
Date Tue, 18 Jun 2002 16:15:40 GMT
> my $x = 'x';
> 
> switch ($x) {
>     case 'x' { print 'x' }
>     else { print 'not x' }
> }
> 
> # %>

I always implement case statements as such....

my $x = 'x';

for ($x) {

    /^x$/
    and do {
        print 'x';
        last;
    };

    # Default
    print 'not x';

}

--
Ian Cass


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Mime
View raw message