in reply to Re^5: File::Binary and Carriage-Return issue
in thread File::Binary and Carriage-Return issue
You're right. A plain filehandle (as likely opened by File::Binary) is an IO::Handle object. And these don't know about the ->binmode method:
Q:\>perl -le "open my $fh, $^X or die $!; $fh->binmode" Can't locate object method "binmode" via package "IO::Handle" at -e li +ne 1.
So the easiest fix approach would be to use File::HandleIO::File objects instead of filenames, but I haven't looked at what API File::Binary uses. It could also make sense to patch File::Binary to use files (as the module name implies).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^7: File::Binary and Carriage-Return issue
by ikegami (Patriarch) on Mar 04, 2009 at 13:25 UTC |