in reply to long if statements... What's the best way?
Cheerslhp@nereida:~/Lperl/src/cookbook/ch16$ perl -wde 0 main::(-e:1): 0 DB<1> use List::Util qw(first) DB<2> $var = 'd' DB<3> print "Found $var\n" if (first { $_ eq $var } qw{a e g h d r}) Found d DB<4> $var = 'x' DB<5> print "Found $var\n" if (first { $_ eq $var } qw{a e g h d r}) DB<6>
Casiano
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: long if statements... What's the best way?
by Herkum (Parson) on Apr 02, 2008 at 19:45 UTC | |
|
Re^2: long if statements... What's the best way?
by lodin (Hermit) on Apr 03, 2008 at 12:32 UTC |