note
kabel
<code>
F:\>perl
use strict;
use warnings;
my @numbers = 1 .. 10;
@numbers = grep {
$_ > 4
} @numbers;
print "@numbers";
^D
5 6 7 8 9 10
F:\>
</code>
grep iterates through @numbers, sets $_ to the current element and if the block returns true, the element will be in the output list. so just call foo inside the grep block with $_ and it should work.
217348
217348