Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: how to use matching operator on newlines

by kyle (Abbot)
on Jan 03, 2007 at 21:44 UTC ( [id://592837]=note: print w/replies, xml ) Need Help??


in reply to Re^2: how to use matching operator on newlines
in thread how to use matching operator on newlines

You really need the -i option to edit the file in place as the OP did (I love the irrational number options "-pi -e"). Avoiding slurping is good (especially if it's a large file). The chomp usage is clever, but I think I prefer your first line. Not only does it have one less weird variable, but the s also makes it a lot more obvious what it's doing. On the other hand, maybe I shouldn't be worried about the readability of a one-liner.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-23 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found