warn scalar grep {1} foo(); my $count = 0; $count++ for foo(); warn $count ;