Perl CGI.pm and Unicode

Because I always forget how to handle Unicode input/output in Perl .. a few notes to help jog my memory for next time: Remember to use both CGI.pm and Encode.pm: use CGI qw(:standard); use Encode qw(decode encode); Handle webform input with Unicode characters: my $input = decode(‘utf8’, param(‘input’)); Prepare scalar variables to cope with Unicode … Read more

Dynamic IP script for Internode

WWW::Mechanize script for programmatically obtaining the current (dynamic) IPv4 and IPv6 addresses assigned to an Internode ADSL session: #!/usr/bin/perl use strict; use warnings; use WWW::Mechanize; ## Get current session data for our Internode session my $mech = WWW::Mechanize->new(); my $user = “”; ## Enter Internode username my $pass = “”; ## Enter Internode password $mech->get(‘https://secure.internode.on.net/myinternode/sys0/login’); … Read more