If you want, you can assign @have back to @orig at the end.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";
In reply to Re: another elegance contest
by Eimi Metamorphoumai
in thread another elegance contest
by tos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |