my $number = ( split ' ', $string, 3 )[1]; #### #! perl -slw use strict; use Benchmark qw[ cmpthese ]; our $string = "zero one two three"; our $string = "zero one two three"; cmpthese( -5, { 'list\s+' => q[ my $num = ( split /\s+/, $string ) [1] ], 'anon\s+' => q[ my $num = [ split /\s+/, $string ]->[1] ], 'list\s+3' => q[ my $num = ( split /\s+/, $string, 3 ) [1] ], 'anon\s+3' => q[ my $num = [ split /\s+/, $string, 3 ]->[1] ], "list' '" => q[ my $num = ( split ' ', $string, ) [1] ], "list' '3" => q[ my $num = ( split ' ', $string, 3 ) [1] ], }); __END__ P:\test>test Rate anon\s+ anon\s+3 list' ' list\s+ list\s+3 list' '3 anon\s+ 13679/s -- -13% -47% -48% -56% -57% anon\s+3 15789/s 15% -- -39% -40% -50% -50% list' ' 25818/s 89% 64% -- -2% -18% -18% list\s+ 26330/s 92% 67% 2% -- -16% -16% list\s+3 31370/s 129% 99% 22% 19% -- -0% list' '3 31493/s 130% 99% 22% 20% 0% --