JupiterHost.Net wrote:
John W. Krahn wrote:
JupiterHost.Net wrote:
http://search.cpan.org/~tjenness/File-Temp-0.16/Temp.pm#BINMODE
says:
"The file returned by File::Temp will have been opened in binary mode
if such a mode is available. If that is not correct, use the
binmode() function to change the mode of the filehandle."
perldoc -f binmode
doesn't seem to touch on how to "use the binmode() function to change
the mode of the filehandle." back to ascii mode.
Anyone know how that's done or what part I missed ;)
perldoc -f binmode
Also see:
perldoc PerlIO
So if I'm reading right:
binmode $fh; # binary mode
binmode $fh, :crlf; # ascii mode ??
Would effectively undo binmode $fh; correct? or am I missing the right
LAYER?
If you read through:
perldoc PerlIO
And:
perldoc perliol
You should be able to figure it out, if not, maybe this will help:
$ perl -e'
open FH, "test.txt" or die $!;
@layers = PerlIO::get_layers( FH );
print "@layers\n";
binmode FH;
@layers = PerlIO::get_layers( FH );
print "@layers\n";
'
unix perlio
unix perlio
If you are on Windows then of course the layers will be different but the
documentation will explain that.
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>