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

Issues with split

From:
ToddAndMargo via perl6-users
Date:
October 20, 2018 04:11
Subject:
Issues with split
Message ID:
fb5d3f53-3be3-601f-6204-707cbe0d6703@zoho.com
Hi All,

I am reading the output of

    curl https://www.bleepingcomputer.com/download/adwcleaner/ -o -

and looping through it with split.

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

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

AAAHHHHH!

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



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About