#!/usr/local/bin/perl foreach (@ARGV){ print "Working on file $_ \n"; if (-e $_){ system("/home/rminchin/progs/corr_fits $_"); } else { print "File $_ not found!\n"; } }