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:
Or you could just use unix/linux commands that do the same thing:perl -e 'undef $/; $_=<>; tr/\n/ /; s/ $/\n/; print' list
(If you want a clean line break at the end of that output, add && echo at the end.)xargs echo -n < list
In Section
Seekers of Perl Wisdom