Basically, there are two identical grep calls, with a regex between them. This prints (at least in ActiveState Perl 5.12.3 on XP SP3):use strict; use warnings; print grep({"" =~ /$_/} (""))."\n"; "foo" =~ /foo/; print grep({"" =~ /$_/} (""))."\n";
Why in the world does the "foo" regex in the middle affect the second grep result ?1 0
In reply to grep trouble by LogMiner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |