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
call it version 1.0
destroy all evidence that I tried
pay someone else to do it for me
have some cake
try two more times so my failure is statistically significant
Results (143 votes). Check out past polls.