Help for this page

Select Code to Download


  1. 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)
    
  2. or download this
    sysseek $infile, $buffer, 1;
    sysread $infile, $new, 0x40000;
    syswrite $newfile, $new;
    
  3. or download this
    my $buffer = '';
    sysseek $infile, 0x15, 0;
    sysread $infile, $buffer, 0x03;
    syswrite $outfile, $buffer;
    
  4. or download this
    sysseek $infile, $buffer, 1;
    sysread $infile, $new, 0x40000;
    syswrite $newfile, $new;