in reply to another elegance contest

my $x = "klops"; my @orig = qw(apfel klops klops börne joghurt klops nüß); my (@have, @havenot); push @{(/$x/ ? \@have : \@havenot)}, $_ for @orig; print "@have\n@havenot\n";
If you want, you can assign @have back to @orig at the end.