Logging into airbears through the browser each time my laptop connects is a pain. This script made it less painful:
#!/usr/bin/perl -w
use strict;
$|++;
use File::Basename;
use WWW::Mechanize 0.72;
my $mech = WWW::Mechanize->new( );
$mech->get( “https://wireless-gw1.berkeley.edu/logon” );
$mech->success() or die “Couldn’t connect to wireless login page”,
$mech->response->status_line;
# Select the form, fill the fields, and submit
$mech->form_name( “logonForm” );
$mech->set_visible([text=>"username"],[password=>"password"]);
$mech->click(“logon_action”);
$mech->success or [...]