in reply to Re: Re: Re: My vacation depends on it
in thread My vacation depends on it
P.S. Are you a sadist?(no -w strict, you must -w strict)$cat = 'ata'; SWITCH: for ($cat) # make $_ = $cat, you could do it by hand { # syntaxt # whatever test on $_ && do { $this = 'if test passed'; last;}; (length $_ > 1) && do { die "\$cat must be one letter not: `$cat'" +; last;}; /t/ && do { $catfile = "notitec.html"; last; }; /a/ && do { $catfile = "notiagro.html"; last; }; /d/ && do { $catfile = "notideportes.html"; last; }; /h/ && do { $catfile = "notihogar.html"; last; }; /r/ && do { $catfile = "notirecrea.html"; last; }; /s/ && do { $catfile = "notisociales.html"; last; }; die "unknown value for \$cat: `$cat'"; # could just as easily be the default value }
update: I agree tilly, not that i'd dare disagree with you ;). I feel <10 and not gonna expand, is a good time to use one.
___crazyinsomniac_______________________________________
Disclaimer: Don't blame. It came from inside the void
perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 1: (crazyinsomniac: switch) Re: (4) My vacation depends on it
by tilly (Archbishop) on Apr 04, 2001 at 07:47 UTC |