Let's say I want to know if anything in @ARGV has one of a certain list of suffixes in it. So I write:
foreach (@ARGV) { print if (/\.(fish|foul)$/); }
But if I have a long list of suffixes, then I would like to store the suffixes in an array, and then evaluate the array in my regular expression. What does this? I've tried:
@SUFF = (fish,foul); foreach (@ARGV) { print if (/\.(@SUFFIXES)$/); }
and also:
@SUFF = (fish,foul); foreach (@ARGV) { print if (/\.(@[EMAIL PROTECTED])$/); }
but I can't get it to work. -- -- Jason Dusek ("`-''-/").___..--''"`-._ -- | `6_ 6 ) `-. ( ).`-.__.`) -- | (_Y_.)' ._ ) `._ `. ``-..-' -- | _..`--'_..-_/ /--'_.' ,' -- | (il),-'' (li),' ((!.-' --
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>