Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
P is for Practical
 
PerlMonks  

Re: perl one liner to search for a string, then search for a different string and append a new line

by bart (Canon)
on Dec 20, 2012 at 11:52 UTC ( #1009726=note: print w/ replies, xml ) Need Help??


in reply to perl one liner to search for a string, then search for a different string and append a new line

The cause that nothing is working is probably because you process the file line by line and the parts of the strings you are looking for are on different lines. You can slurp in the whole file by using the -0 command line switch with an octal value that does not represent an existing character, as per the docs.


Comment on Re: perl one liner to search for a string, then search for a different string and append a new line

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2014-04-20 00:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls