home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 10 / AU_CD10.iso / Updates / Perl / Non-RPC / !Perl / scripts / unsquash < prev    next >
Text File  |  1998-04-24  |  358b  |  17 lines

  1. #!perl -w
  2. # Version 0.01
  3.  
  4. undef $/;
  5. while (<>) {
  6.     my $file = $ARGV;
  7.     unless (/^SQSH/) {
  8.         warn "'$file' is not a squash file\n";
  9.         next;
  10.     }
  11.     close ARGV;
  12.     unlink $file;
  13.     open OUT, "|gzip -d > $file" or warn "Whoops. Could not open '$file': $!";
  14.     print OUT substr $_, 20;
  15.     close OUT or warn "Problem unsquashing '$file'";
  16. }
  17.