foreach $xyfile (@xyfiles) { if (! -e $xyfile) { print "\a"; die "\nInput file $xyfile cannot be opened!\n$program_name aborted\n"; } }