perl -wle 'my $has_even; @_ = -1 .. 9; for( @_ ){ print $_; $_ % 2 or $has_even = 1 and last } print "\$has_even:[$has_even]"; '