use strict; use warnings; for (@ARGV) { if (-e) { &doTheWork($_); } else { warn qq{"$_" doesn't exist!}; } }