my $string = $result->[0]; my $num = $result->[1]; # oder: my( $string, $num ) = @$result;