system_prompt>my_script.pl $file1 system_prompt>my_script.pl $file2 #### system_prompt>my_script.pl $file1 $file2 #### die "Usage: $0 file1 file2" unless @ARGV == 2; ... for (@ARGV) { process_file($_); } ... sub process_file { my ($filename) = @_; open my $input_fh, '<', $filename or die "Can't open '$filename': $!"; ... } #### my $exit = ''; until ($exit) { ... code where $exit never becomes TRUE ... } #### sub infile($file1); #will this be passed to ARGV[0]? ... sub infile(file2); #will this be sent to ARGV[0] as well after the first file?