in reply to conditional syntax options
The code you provide is clear and concise enough, I would stay with it. But, just for curiosity, since Perl 5.10 you can use the smart-match (~~) operator for a shorter alternative (see perlop):
- if (! $string ~~ qw/A B/)
- if ($string ~~ qw/A B/)
- Comment on Re: conditional syntax options
- Select or Download Code
citromatik
In Section
Seekers of Perl Wisdom