http://www.perlmonks.org?node_id=62398

MrNobo1024 has asked for the wisdom of the Perl Monks concerning the following question:

'foo' =~ m/.*/; print eval <STDIN>;
I ran this program, and entered the text '$&'. It printed out 'foo'. If you don't use $`, $&, or $' in your program at all, they aren't set on a regex match. There was no way for Perl to know I was going to enter $& into STDIN, so why did it set it? Does this mean that Perl is psychic?