next if not -f $fname; # or the somewhat too dense warn "$fname is not a file" and next unless -f $fname;