SPUG: Parsing (Windows) PE files in Perl
Yitzchak Scott-Thoennes
sthoenna at efn.org
Thu Jan 12 18:55:29 PST 2006
On Thu, Jan 12, 2006 at 06:56:45AM -0800, jerry gay wrote:
> On 1/12/06, Uri London <uril at exchange.microsoft.com> wrote:
>
> > Assuming a package doesn't exist, please help with some novice questions:
> >
> > - How to open a file in a binary mode?
> see 'perldoc -f binmode'
> it'll go something like:
>
> my $file = 'foo.dll';
> open(local *PE, '>', my $file)
> or die qq{can't open $file: $!};
> binmode 1;
Are there versions of perl that support 3-arg open but not lexical
filehandles?
There are a couple of errors there; I'd make that:
my $file = 'foo.dll';
open( my $pe, '>', $file )
or die "Can't open $file: $!";
binmode $pe;
More information about the spug-list
mailing list