Of course, this is just a band-aid, as binmode actually does something, nowadays even on systems with unixish file semantics. Most likely, the proper fix would be to upgrade IO::File to a later version than is installed, or to copy the code for IO::File::binmode into that subroutine:
sub binmode {
( @_ == 1 or @_ == 2 ) or croak 'usage $fh->binmode([LAYER])';
my($fh, $layer) = @_;
return binmode $$fh unless $layer;
return binmode $$fh, $layer;
}
| [reply] [d/l] |
and where in my code must I set this?, srry, I'm still a rooky in perl. just 3 weeks of experience with this...
| [reply] |
Corion's suggestion of adding the "binmode" sub to your code is not unreasonable, but if you're new to Perl, the simplest answer for you is just to update the IO::File module. If you've never done that, modern Perls provide a script that makes it easy - it's called 'cpan'. Assuming that you're on some sort of *nix (rather than Windows) and that you have access to root privieleges, all you need to do is run 'cpan' as root at your command line, and follow the setup prompts; once you're done with the setup, just type 'install IO::File' and that'll take care of it.
Just for completeness' sake - on older versions of Perl, where there's no "cpan" script, you'd type "perl -MCPAN -eshell" (again, as root) to do essentially the same thing. This also works on modern versions.
--
"Language shapes the way we think, and determines what we can think about."
-- B. L. Whorf
| [reply] |