my $old; for (@array) { print "jetzt: $_\n"; print "eben : $old\n" if defined $old; $old = $_; }