Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: another elegance contest

by l.frankline (Hermit)
on Nov 16, 2005 at 12:40 UTC ( [id://509008]=note: print w/replies, xml ) Need Help??


in reply to another elegance contest

Hi,

Its my idea....

     $i=0;
     $x="klops";
     @a=qw(apfel klops klops börne joghurt klops nüß);
     @new = ();
     for ($i=0;$i<=$#a;$i++)
     {
       if (grep/$x/,$a[$i])
       {
         push (@new,$a[$i]);
         delete ($a[$i]);
       }
     }

     print @a;
     print @new;

Thanx
Franklin
Don't put off till tomorrow, what you can do today.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://509008]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2024-03-28 12:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found