This code avoids "Action at a distance", by making wierd settings in as limited a scope as possible.{ # Add an enclosing block local $/= "\n\n\n"; while(<>){ local $/="\n"; # Reset to normal behaviour inside loop only my ($filename)=/^(\S+)/; my $text=reader::firstline($filename); } } # End enclosing block.
This is not an optical illusion, it just looks like one.
In reply to Re: Scope of $/
by NetWallah
in thread Scope of $/
by agarrubio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |