The SF Perl Raku Study Group, 01/29 at 1pm PDT

2023-01-26 Thread Joseph Brenner
George Sand to Gustave Flaubert, November 29th, 1866: "I have never ceased to wonder at the way you torment yourself over your writing. Is it just fastidiousness on your part? There is so little to show for it... As to style, I certainly do not worry myself, as you do, over th

Re: `lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace

2023-01-26 Thread William Michels via perl6-users
Thanks Sean. Made some progress. I like this result better: ~$ raku -e 'put "1\n2\n3";' | raku -e 'lines.map(*.contains(/ \h /)).put;' False False False Thx, Bill. On Thu, Jan 26, 2023 at 12:12 PM Sean McAfee wrote: > On Thu, Jan 26, 2023 at 12:05 PM William Michels via perl6-users < > perl6-

Re: `lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace

2023-01-26 Thread Sean McAfee
On Thu, Jan 26, 2023 at 12:05 PM William Michels via perl6-users < perl6-us...@perl.org> wrote: > ~$ raku -e 'put "1\n2\n3";' | raku -e 'put lines.contains(/ \h /) ?? True > !! False;' > True > lines() returns a Seq. The contains method for a Seq coerces its argument to a Str and calls contains

`lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace

2023-01-26 Thread William Michels via perl6-users
Hi, I'm seeing an issue where I try to write parallel code between `slurp` and `lines`, expecting that when I feed each one-liner a string with vertical whitespace (but not horizontal whitespace), the two methods will be differentiated--since lines autochomps by default. ~$ raku -e 'put "1\n2\n3";