Once you go to BINMODE on a file handle, a record separator makes no sense.
Maybe you should have tested this.
This gives:#!/usr/bin/perl use strict; use warnings; binmode DATA; my $binary = <DATA>; print "$binary\n"; __DATA__ first second
first
Greetings,
-jo
In reply to Re^2: Error binmode() on unopened filehandle
by jo37
in thread Error binmode() on unopened filehandle
by RedJeep
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |