this({ string => $string, times => 10, }); sub this { my $p = shift; # all params in hashref print $p->{string} x $p->{times}; }