Andrew Solomon <and...@geekuni.com> writes:

> Hi Harry
>
> I was about to try to explain it but sometimes a picture is worth a
> thousand words (even if it's a picture of code:)

Yes, that did the job.  I guess I was pretty confused about what
`slurp' means... I was expecting the newlines to disappear.

But of course, I see now, that first off $/ is the `input record
separator and so would not do like what one might to with awk using
its output record separator:

awk 'BEGIN{ORS=""}{print}' bar.txt
  thisisavery long test

And secondly removing the new lines would probably introduce as many
problems as it might solve.

I just had it in my head that the newlines were to be ditched
somehow. So when I saw the result of processing my .bashrc file (which
I only used because it was handy for testing), I thought I was doing
something wrong.  But ... it was working as advertised all the time.

Thanks for takine the time to clear that notion out of my head.


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to