While your example works as shown it is contrary to the docs (perlop) and also fails to explain the observed behaviour noted above.....It's not that there's anything special cased for =~ or double quotes. It's just the general concept of "if you use a thingybob as a fnord, Perl will treat the thingybob as a fnord". Consider the following code, where an array is treated like a number, and a number like a regex.
$ perl -wle '@a = "foo"; print "Yes" if 2 =~ (@a + 1)' Yes
Abigail
In reply to Re: what function of this Regular Expression?
by Abigail-II
in thread what function of this Regular Expression?
by iwanthome
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |