my @output = map { doTransformation( $_ ); } grep { shouldSelectData( $_ ); } @data;