in reply to Mechanizing around Javascript

if ($mech->success()){
The default is autocheck is ON, which means you don't have to check for success, it will die if unsuccessful.
$mech->follow_link( url=> 'https://...
Why follow_link? Just get() it.