Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1059931]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2017-07-22 21:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (342 votes). Check out past polls.