Re: `lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace
[email protected] (Sean McAfee)
| Newsgroups | perl.perl6.users |
|---|---|
| Message-ID | <CANan03YW4VnuyKA6GWzWqeG28bv1A_uTSL5WjgLPwDJGSqsM4A@mail.gmail.com> |
On Thu, Jan 26, 2023 at 12:05 PM William Michels via perl6-users < [email protected]> 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 on that Str. And: $ raku -e 'put "1\n2\n3"' | raku -e 'put lines.Str' 1 2 3 There's your horizontal whitespace.