$x = 2;




sub howmany
{
    my ($f,@L) = @_;
    my $c = 0;
    foreach my $x (@L) { if ($f->($x)) {$c++} }
    $c
}


print howmany( sub{$_[0] > 5}, (3,6,2,8,1) ), "\n";
