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

Re: A new question from the front line

by blakem (Monsignor)
on Oct 18, 2002 at 08:15 UTC ( #206243=note: print w/replies, xml ) Need Help??

in reply to A new question from the front line

If you know 'energy' wont occur on successive lines, how about:
perl -pe'$_=/\benergy\b/&&<>'


Replies are listed 'Best First'.
Re^2: A new question from the front line
by Aristotle (Chancellor) on Oct 18, 2002 at 13:57 UTC
    His own code doesn't fulfill the successive lines criterion either. Golf time: perl -pe'$_=/energy/?<>:""'
    Hmm, yours beats me if you take out the \b though.

    Makeshifts last the longest.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (12)
As of 2016-10-27 12:31 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (362 votes). Check out past polls.