phl.jns has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to run the script on an older box that has perl version 5.005_03 on it - the method I have used will not work pre v5.8. What other methods can I use to scope filehandles ? The subroutine that uses this line in my script will be called recursively and I don't want to trample my open filehandles. Thanks, Philopendir (my $sub_dir, $dir) or die "Couldn't open $dir : $!\n"; while (defined (my $file = readdir($sub_dir)) )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Lexical scoping for filehandles, pre perl 5.8
by jwkrahn (Abbot) on Oct 23, 2008 at 11:00 UTC | |
|
Re: Lexical scoping for filehandles, pre perl 5.8
by Anonymous Monk on Oct 23, 2008 at 11:01 UTC | |
by phl.jns (Novice) on Oct 23, 2008 at 11:16 UTC | |
by phl.jns (Novice) on Oct 23, 2008 at 11:20 UTC |