in reply to Re^5: Bad file descriptor when trying to close file handle
in thread Bad file descriptor when trying to close file handle
The directory entry is gone, yes. Writing to a file doesn't create directory entries.
I didn't mention glob at all. Did you try the steps I described? The file is only gone once no directory and no file handles reference it. Also, see the post I just made in parallel to yours.
$ perl -Mv5.10 -e' open my $o_fh, ">", "a" or die $!; open my $i_fh, "<", "a" or die $!; unlink "a" or die $!; print $o_fh "abc\n" or die $!; $o_fh->flush(); chomp( my $line = <$i_fh> ); say "<$line>"; ' <abc>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Bad file descriptor when trying to close file handle
by LanX (Saint) on Mar 03, 2022 at 16:01 UTC | |
by ikegami (Patriarch) on Mar 03, 2022 at 16:05 UTC | |
by ikegami (Patriarch) on Mar 03, 2022 at 16:11 UTC | |
by LanX (Saint) on Mar 04, 2022 at 13:59 UTC |