in reply to binary edit
You're trying too hard. You don't need pack, unpack or "hex editing".
Update: As pointed out by dave_the_m below, I mixed up my options: Switched -n for -p
This should work if you're on Windows:
perl -ple"binmode*ARGV if $.==1; s[P200000976][Test123456]g;" <infile +>outfile
Or this if you're on *nix:
perl -ple's[P200000976][Test123456]g;' <infile >outfile
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: binary edit
by pbyfire (Novice) on Apr 24, 2012 at 18:23 UTC | |
by dave_the_m (Monsignor) on Apr 24, 2012 at 18:43 UTC | |
by johngg (Canon) on Apr 24, 2012 at 19:00 UTC | |
by pbyfire (Novice) on Apr 24, 2012 at 19:30 UTC |