$ perl -wE '{map {say; last if /3/} 1..5}' 1 2 3