http://qs321.pair.com?node_id=509016


in reply to another elegance contest

my $x = qr(klops); my @a = qw(apfel klops klops börne joghurt klops nüß) my @e; @a = grep { $_ !~ $x or not push @e, $_ } @a;

Replies are listed 'Best First'.
Re^2: another elegance contest
by tos (Deacon) on Nov 16, 2005 at 15:42 UTC
    Salve SALVA, :-)

    that's a really fabulous solution. It's just the kind of consise perl-semantics i like so much. Unfortunatly i'm only rarly able to create such pretty code-jewels by myself.

    I also tried approaches with 'grep' but the 'not'-trick would never have occurred to me.

    Thank you brother, ;-)

    regards, tos


    Is simplicity best or simply the easiest Martin L. Gore