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

  1. use RISCOS::Filespec;
  2. # Want the default functions and also the glob control functions
  3. use RISCOS::File ':DEFAULT', '/glob/';
  4.  
  5. $ARGV[0] = "System:Modules" unless @ARGV;
  6.  
  7. while (my $pattern = shift)
  8. {
  9.   print "Default - glob returns full pathnames\n";
  10.   foreach (glob ($pattern)) { print "  $_\n"; }
  11.   
  12.   glob_control (&fileglob_PrintOriginalPath);
  13.   print "Alternative - glob retains the path variable\n";
  14.   foreach (glob ($pattern)) { print "  $_\n"; }
  15.   glob_control (&fileglob_PrintExpandedPaths);
  16. }
  17.