use Benchmark qw(cmpthese); sub x_shift { my $a = shift } sub x_copy { my $a = $_[0] } my @args = (1 .. 3); cmpthese(1000000, { x_shift => 'x_shift(@args)', x_copy => 'x_copy(@args)' });