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";' | raku -e 'put slurp.contains(/ \h /) ?? True
!! False;'
False
~$ raku -e 'put "1\n2\n3";' | raku -e 'put lines.contains(/ \h /) ?? True
!! False;'
True

However, my 'control case' (second example above) is showing that a string
devoid of apparent whitespace is coming up positive, i.e. returning True. I
would think this is a 'trap for the unwary', if it is indeed the specified
behavior.

Comments/feedback welcome and appreciated.
FYI I'm on Rakudo™ v2022.07.

Thx, Bill.

Reply via email to