> --- perl-current/lib/DirHandle.pm 2006-06-13 21:29:13.000000000 +0200 > +++ DirHandle.pm 2008-06-02 14:46:27.000000000 +0200 > @@ -60,6 +60,7 @@ > my ($dh) = @_; > # Don't warn about already being closed as it may have been closed > # correctly, or maybe never opened at all. > + local($., $@, $!, $^E, $?); > no warnings 'io'; > closedir($dh); > } > Why do you localise $. ? echo -e 'abc\ndef\nghi' | perl -wle 'print $.; while (<>) { local ($., $@); print $. };print $.' output: Use of uninitialized value $. in print at -e line 1. 1 2 3 3 And not: Use of uninitialized value $. in print at -e line 1. 1 2 3 Use of uninitialized value $. in print at -e line 1. Kind regards, BramThread Previous | Thread Next