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
Give me a lever long enough ...
Eppur si muove
Mr. Watson – Come here – I want you
Mary had a little lamb
That's one small step for a man ...
SCE to AUX
I think I'll stop here
Results (263 votes). Check out past polls.