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