in reply to Why is $a.$b not = "$a$b"?
$a.($b =~ /C/)
Good answer! Short, but good.
To expand on that, Perl's operator precedence has '=~' higher than '.'.
So to get the '.' notation to work as I want it to, I assume I should (parenthesise) it, like this:
$ perl -e '$a="A";$b="B";print "Matches!\n" if ($a.$b) =~ /A/'
$ perl -e '$a="A";$b="B";print "Matches!\n" if ($a.$b) =~ /C/'
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
15 years from now, by which time it will be a completely different language
It's just a number, so who cares?
Results (150 votes). Check out past polls.