develooper Front page | perl.perl6.users | Postings from October 2018

Issues with split

ToddAndMargo via perl6-users
October 20, 2018 04:11
Issues with split
Message ID:
Hi All,

I am reading the output of

    curl -o -

and looping through it with split.

This gets me about 1/20th of the lines:

     for split "\n", $WebPage -> $Line {


Doing a hex edit on the downloaded file, the delimiter is 0H0A

And this works!

     for split chr(0x0A), $WebPage -> $Line {

WHAT THE HECK does split think "\n" is anyway????  Is it
looking for a 0H12 or 0H13 ????

<editorial comment> AAAAAAAAHHHHHHHHHHH!!!!!</editorial comment>

-T Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About