azadian has asked for the wisdom of the Perl Monks concerning the following question:
According to The Book, a regex which fails in a list context returns a null list. Here's my test:
perl -e 'print "MATCHED\n" if @list = q(foo bar baz) !~ m/\bbar\b/'
This yields "MATCHED" for me with Perl version 5.8.8. Am I missing something, or is this a Perl bug? Looking at it more closely, I discover that what I get is a list with a single (empty) element.
Back to
Seekers of Perl Wisdom