12345678910111213141516171819
use CGI;use strict;my $q = new CGI;print $q->getparam('id');package CGI;sub getparam{ my ($self, $what) = @_; my $result = $self->url_param($what); unless($result) { $result = $self->param($what); }; return $result;}1;