in reply to Closing a filehandle in ":unix" layer doesn't work on Win32
Adding a unix layer makes no sense. I suspect both the existing unix layer and the one you add are trying to close the handle. Of course, only one will succeed. Do you have the problem if you use the following without binmode?
$fh->open("<:unix $filepath")
I would never use that, though. The following is the same, but provides buffering:
$fh->open("<:perlio $filepath")
The best solution is probably the following, though.
$fh->open("< $filepath"); binmode($fh);
Although I'd write it as
open(my $fh, '<', $filepath); binmode($fh);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Closing a filehandle in ":unix" layer doesn't work on Win32
by rovf (Priest) on Mar 29, 2011 at 08:30 UTC | |
by ikegami (Patriarch) on Mar 29, 2011 at 08:45 UTC | |
by Anonymous Monk on Mar 29, 2011 at 08:37 UTC |