using @ARGV to get user-defined arguments

2003-05-28 Thread cbgb
---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/

using @ARGV to get user-defined arguments

2003-05-28 Thread cbgb
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