Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: $/ usage

by graff (Chancellor)
on Jan 02, 2013 at 22:44 UTC ( #1011369=note: print w/replies, xml ) Need Help??


in reply to Re^2: $/ usage
in thread $/ usage

To get all the lines from a slurped input file to show up as a single line on output, you want something like this:
perl -e 'undef $/; $_=<>; tr/\n/ /; s/ $/\n/; print' list
Or you could just use unix/linux commands that do the same thing:
xargs echo -n < list
(If you want a clean line break at the end of that output, add  && echo at the end.)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011369]
help
Chatterbox?
[Corion]: DST does that to everybody...
Corion attempts to find who to address to better target his drive-by patches
[Corion]: This time it's for the Duktape embedded Javascript engine, which would be nice to have IMO, but doesn't compile on Windows currently
[Corion]: I imagine it would be fun to have WWW::Mechanize:: Duktape, but I haven't seen a web browser written in Javascript yet, except the ones distributed with PhantomJs

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2017-03-27 11:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (319 votes). Check out past polls.