Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: One-liners: Conditionals in Loops

by particle (Vicar)
on Nov 04, 2003 at 20:53 UTC ( #304532=note: print w/replies, xml ) Need Help??


in reply to One-liners: Conditionals in Loops

to solve this specific problem, use perl -le"/pattern/ && print for @arr". this change handles the logic found in most (of my) one-liners.

~Particle *accelerates*

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://304532]
help
Chatterbox?
[GotToBTru]: my wife told him to spit it out, so he did
[erix]: yeah, modern dogs are cute tjhat way :)
[erix]: except of course, the RHODESIAN LION HOUND ! :)
[Discipulus]: in roma cars are good mouser.. fortunnately no mouse at 7th floor..
[GotToBTru]: that's a name that should always be accompanied by a trumper fanfare
[GotToBTru]: trumpet, not trumper
[GotToBTru]: good thing too, Discipulus, no roads on the 7th floor either
[GotToBTru]: okay, fess up, who installed CB::Typo?
[Discipulus]: at 7th floor seagulls eat mice

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (14)
As of 2017-11-17 20:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (272 votes). Check out past polls.

    Notices?