|
|
| Don't ask to ask, just ask | |
| PerlMonks |
(jptxs)Re: Perl is psychic?!by jptxs (Curate) |
| on Mar 06, 2001 at 00:06 UTC ( [id://62400]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
according to the Perl5 Pocket Ref, $& is the string matched by the last successful pattern match. Since your regex .* matches anything $& is set to that by the first line, which matches foo and that's what you print in your eval - it eval's $& and finds 'foo' there. I think... =)
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||