in reply to WWW::Mechanize Error "GETing" stop the program,

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

Replies are listed 'Best First'.
Re^2: WWW::Mechanize Error "GETing" stop the program,
by Corion (Patriarch) on Apr 14, 2010 at 14:04 UTC

    Please read the WWW::Mechanize documentation. There is no need for the sledgehammer approach to catching exceptions from ->get, as WWW::Mechanize will happily cooperate if you allow it to.

      No thanks, I like the life or death approach
Re^2: WWW::Mechanize Error "GETing" stop the program,
by RedGrinGo (Novice) on Apr 14, 2010 at 13:50 UTC

    Hi Thanks

    what is the number 1 reffer in the script?

      True value. I never remember if get return true on success so I always type 1, because I know that it will die on failure , which always returns false (and then the or warn part is executed).