#!/usr/bin/perl -w use strict; use warnings; use diagnostics; my @inhalt = (10,20,undef,40); print "Und:\n" . join ("\n",grep {defined $_} @inhalt) . "\n";