sbank has asked for the wisdom of the Perl Monks concerning the following question:
But when I look at the $outfile, I see 0x1F and 0x8B at the end of the file.use IO::Seekable; open(OUTPUT, ">> $outfile") or die "can't open file $outfile: $!"; seek OUTPUT, 0, 0; # seek to the beginning of the file? print OUTPUT "\037\213"; # append gzip magic (0x1F 0x8B) close OUTPUT;
Edit: chipmunk 2001-05-22
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Appending to the embeginning/em of a file.
by merlyn (Sage) on May 22, 2001 at 21:35 UTC | |
by Vynce (Friar) on May 23, 2001 at 16:43 UTC | |
by Anonymous Monk on Jan 03, 2002 at 08:53 UTC |