in reply to Re: long if statements... What's the best way?
in thread long if statements... What's the best way?

Be aware of false strings that match.

use List::Util 'first'; my $var = '0'; if (first { $_ eq $var } $var) { print "Found.\n"; } else { print "Not found.\n"; } __END__ Not found.
You could solve this by using defined in this particular case, but it's not a general solution. As Herkum says, any from List::MoreUtils is a better alternative in the general case.

lodin