in reply to Re: Re: Re: what function of this Regular Expression?
in thread what function of this Regular Expression?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: what function of this Regular Expression?
by pelagic (Priest) on Apr 02, 2004 at 08:47 UTC |