Help for this page
my @result = map { f($_) ? g($_) : () } @list; ... for (@list) { push(@result, g($_)) if (f($_)); }