in reply to Extracting two numbers from a string

#!/usr/bin/perl -- use strict; use warnings; use CGI(); my $q = CGI->new('examplestringofrandomlength&userid=6&refid=49' ); for my $p( qw! userid refid ! ){ print "$p = ", scalar $q->param($p), "\n"; } __END__ userid = 6 refid = 49