Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: how to deal with newline

by Lennotoecom (Pilgrim)
on Oct 27, 2013 at 20:02 UTC ( #1059931=note: print w/ replies, xml ) Need Help??


in reply to how to deal with newline

perl -ne 'print $1,"\n" foreach /[name|id]="(\w+)/' myfile.txt
update
on the second thought:

perl -ne 'print "$1\n" if /[name|id]="(\w+)/' myfile.txt
would be enough


Comment on Re: how to deal with newline
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2015-07-29 06:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls