---apologies if this turns out to be a double-posting---

ATM I can use @ARGV by forcing it to read specified files
(see sample below). But how can I turn it into a subroutine
that accepts any filenames and can be called within a script, eg: &myroutine("fileA","fileB") ?


thanks
Chris


#!/usr/bin/perl -Tw


@ARGV=("textfile","craig");

foreach $arg (@ARGV){
   if (-e $arg) {
      print "$arg is a file\n";
   }else {
      print "$arg file not found\n";
   }
}


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to