Contents of file "fixup"

#!/usr/bin/perl
# replace byte in binary file
($file, $offset, $byte) = @ARGV;
$byte || die "Usage: $0 FILE OFFSET BYTE\n";
$byte = pack('C', eval("$byte"));
$offset = eval("$offset");
@file = split('', `cat $file`);
die "No such offset $offset in $file\n" if !defined($file[$offset]);
$file[$offset] = $byte;
open(FILE, ">$file") || die "Cannot overwrite $file: $!\n";
print FILE join('', @file);
close(FILE);