in reply to regex variables
I'm not sure I understand the question, and as btrott already said you probably might have wanted to use eq instead. Anyway...
#!/home/bbq/bin/perl
# Trust no1!
# this works my $date = 'dec'; foreach ('november', 'december') { print "yeah, we ski in $_\n" if /$date/; } # this doesn't my $date = 'december'; foreach ('nov', 'dec') { print "yeah, we ski in $_\n" if /$date/; }
#!/home/bbq/bin/perl
# Trust no1!
In Section
Seekers of Perl Wisdom