in reply to Extracting two numbers from a string
use strict; my $str = 'examplestringofrandomlength/userid=6&refid=49'; my ($discard, $num1, $num2) = split /=/, $str; $num1 += 0; print "$num1\n$num2\n"; [download]