in reply to push in for loop

my @problems = (1,2,3); for my $problem (@problems) { push @problems, $problem if $problem; }

That should probably be written as:

my @problems = ( 1, 2, 3 ); push @problems, grep $_, @problems;