in reply to Perl is psychic?!
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... =)
"A man's maturity -- consists in having found again the seriousness one had as a child, at play." --Nietzsche
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: (jptxs)Re: Perl is psychic?!
by MrNobo1024 (Hermit) on Mar 06, 2001 at 05:07 UTC | |
by tilly (Archbishop) on Mar 06, 2001 at 06:50 UTC |
In Section
Seekers of Perl Wisdom