my %hash; foreach my $string ( $try->param ) { if ( $string =~ m/(\d+)_(\d+)/ ) { $hash{$1}{$2} = $try->param($string); } }