use Benchmark; use strict; use List::Util qw(first); my @x = (); for(0..200) { push @x, int(rand(1000)); } Benchmark::timethese(-2, { Grep => sub{my $y = grep {$_ == 300} @x}, Util => sub {my $y = first {$_ == 300} @x} }); Benchmark: running Grep, Util for at least 2 CPU seconds... Grep: 2 wallclock secs ( 2.05 usr + 0.00 sys = 2.05 CPU) @ 24864.13/s (n=50872) Util: 2 wallclock secs ( 2.13 usr + 0.00 sys = 2.13 CPU) @ 7761.41/s (n=16493)