home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 10 / AU_CD10.iso / Updates / Perl / Non-RPC / !Perl / scripts / UnsquMod < prev    next >
Text File  |  1998-07-14  |  440b  |  25 lines

  1. #!perl -w
  2. # Version 0.01
  3. use RISCOS::Module 'rm_unsqueeze';
  4. use RISCOS::Filespec;
  5. use RISCOS::File 'settype';
  6. use strict;
  7.  
  8. die "Syntax $0: <from> <to>\n" unless @ARGV == 2;
  9.  
  10. undef $/;
  11.  
  12. open MOD, "<$ARGV[0]" or die "Couldn't open $ARGV[0]: $!";
  13.  
  14. my $raw = <MOD>;    # Sluuuuurp!
  15.  
  16. my $cooked = rm_unsqueeze $raw;
  17.  
  18. die unless $cooked;
  19.  
  20. open MOD, ">$ARGV[1]" or die "Couldn't open '$ARGV[1]': $!";
  21.  
  22. print MOD $cooked;
  23.  
  24. settype 'Module', $ARGV[1];
  25.