in reply to Re: "readdir() attempted on invalid dirhandle" error?
in thread "readdir() attempted on invalid dirhandle" error?
You can do something.
open my $d, '<', '..' or die $!; # Doesn't die. say -e $d; # 1. say -d $d; # 1. say -f $d; # Nothing. chdir $d or die $!; # Switches to the parent directory ( +read "perldoc -f chdir").
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
chdir FILEHANDLE
by parv (Parson) on Jul 10, 2024 at 21:47 UTC |