foreach my $file( @files ){ eval { $mech->get... 1; } or warn $@' $fileIndex++; }