- or download this
open(my $infile, '<', "./file") or die "Cannot open file: $!";
binmode($infile);
...
syswrite $outfile, $buffer;
$buffer =~ s/(.)/sprintf("%x",ord($1))/eg; #this converts it into hex.
print $buffer, "\n"; #this prints the converted $buffer (04C0)
- or download this
sysseek $infile, $buffer, 1;
sysread $infile, $new, 0x40000;
syswrite $newfile, $new;
- or download this
my $buffer = '';
sysseek $infile, 0x15, 0;
sysread $infile, $buffer, 0x03;
syswrite $outfile, $buffer;
- or download this
sysseek $infile, $buffer, 1;
sysread $infile, $new, 0x40000;
syswrite $newfile, $new;