In your last example you missed the localising, it should be:
{ undef local $/; # with localising open (FH, $filename); while(<FH>) { blah } }
And then - as nobody has done this yet - I add the two definitive links to that topic, both articles from mjd found on his website Coping with Scoping and Seven useful uses of local.
-- Hofmator
In reply to Re: Re: what is the difference between 'my' and 'local'?
by Hofmator
in thread what is the difference between 'my' and 'local'?
by kiseok7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |