No! my $first = (grep /smith/i, @people)[0]; But inefficient, because it will grep more than necessary.