james28909 has asked for the wisdom of the Perl Monks concerning the following question:
i had some help and figured out that $file =~ s/\0{16}//g; works great for 00's, but it doesnt work for FF's -.-open($infile, '<', './file') or die "cannot open file: $!"; binmode $infile; open($outfile, '>', './modifiedfile') or die "cannot open modifiedfile +: $!"; binmode $outfile; local $/; $file = <$infile>; $file =~ tr/\FF*{16}//d; print $outfile $file; close ($infile); close ($outfile);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: delete FF's from a file
by Corion (Patriarch) on Feb 11, 2013 at 09:18 UTC | |
by james28909 (Deacon) on Feb 11, 2013 at 09:26 UTC | |
by james28909 (Deacon) on Feb 11, 2013 at 09:27 UTC | |
by Corion (Patriarch) on Feb 11, 2013 at 09:30 UTC | |
by Anonymous Monk on Feb 11, 2013 at 09:30 UTC | |
|
Re: delete FF's from a file (perlquote)
by Anonymous Monk on Feb 11, 2013 at 09:28 UTC | |
by james28909 (Deacon) on Feb 11, 2013 at 09:30 UTC | |
|
Re: delete FF's from a file
by Lotus1 (Vicar) on Feb 11, 2013 at 15:25 UTC | |
|
Re: delete FF's from a file
by igelkott (Priest) on Feb 11, 2013 at 09:32 UTC | |
by james28909 (Deacon) on Feb 11, 2013 at 09:41 UTC | |
by tmharish (Friar) on Feb 11, 2013 at 10:14 UTC | |
by igelkott (Priest) on Feb 11, 2013 at 15:09 UTC | |
by tmharish (Friar) on Feb 12, 2013 at 13:59 UTC | |
by Anonymous Monk on Feb 11, 2013 at 09:47 UTC | |
by james28909 (Deacon) on Feb 11, 2013 at 09:56 UTC | |
by james28909 (Deacon) on Feb 11, 2013 at 09:46 UTC | |
by Anonymous Monk on Feb 11, 2013 at 09:38 UTC |