Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^5: printing several lines around match

by muba (Priest)
on Jun 19, 2012 at 15:27 UTC ( #977098=note: print w/replies, xml ) Need Help??


in reply to Re^4: printing several lines around match
in thread printing several lines around match

Ain't that one sweet helluva mess.

Change the while line into this. I think it should solve it. But again, untested.

while ( <$HAN> ) {

But more importantly, instead of verbatim copying that code, try to understand what's going on. Try to understand what I am doing, and why, and how. Of course, my way is not the only way and for all I know it might not even be the best way, but it's the thought process that matters.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://977098]
help
Chatterbox?
[LanX]: yep
[Corion]: First he deleted Bielefeld, now he threatens to delete Darmstadt!
[marinersk]: LOL
[Corion]: People claim that Bielefeld exists, but that's just a ploy to hide LanX's acts!

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (10)
As of 2017-05-29 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?