while ( $mech->links )
should be
for ( $mech->links )
Also, I'm not convinced of the reliability of following a link on Page A after having followed a link to Page B. It appears to work for now, but there could easily be side effects, and the behaviour could easily change in the future.
In reply to Re: Logging URLs that don't return 1 with $mech->success
by ikegami
in thread Logging URLs that don't return 1 with $mech->success
by stonecolddevin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |