On 2020-11-14 18:03, Bruce Gray wrote:
On Nov 14, 2020, at 2:06 PM, ToddAndMargo via perl6-users
wrote:
—snip—
But my question still holds.
Why is the \n inside the cell printed literally?
The two characters, backslash and `n`, are output literally,
because you have *input* them litera
> On Nov 14, 2020, at 2:06 PM, ToddAndMargo via perl6-users
> wrote:
—snip—
> But my question still holds.
> Why is the \n inside the cell printed literally?
The two characters, backslash and `n`, are output literally,
because you have *input* them literally.
In single quotes, the backsl
On 2020-11-14 12:03, Brad Gilbert wrote:
I pretty quickly caught my booboo after I pressed send.
A little eggs on the face.
But my question still holds. Why is the \n inside
the cell printed literally?
is the same as
Q :single :words < a b c >
Note that :single means it acts like single quotes.
Single quotes don't do anything to convert '\n' into anything other than a
literal '\n'.
If you want that to be converted to a linefeed you need to use double quote
semantics (or at least tur
>> On Nov 14, 2020, at 14:12, ToddAndMargo via perl6-users
wrote:
>>
>> On 2020-11-14 11:08, Curt Tilmes wrote:
>>> On Sat, Nov 14, 2020 at 2:03 PM ToddAndMargo via perl6-users
>>> wrote:
Just out of curiosity, why is the \n printed out literally here?
p6 'my @x = <"aaa\n","bbb\n","cc
The <…> and «…» constructors break on whitespace.
So will actually produce the following array:
["a,b,c,d,e,f"]
It's only one item. If we placed space after the comma, that is, , you'd get a six item list, but with the commas attached to all but the
final:
["a,", "b,", "c,", "d,", "e,
On 2020-11-14 11:08, Curt Tilmes wrote:
On Sat, Nov 14, 2020 at 2:03 PM ToddAndMargo via perl6-users
wrote:
Just out of curiosity, why is the \n printed out literally here?
p6 'my @x = <"aaa\n","bbb\n","ccc\n">; for @x {print @_};'
Your 'word quoting' <> is sort of like single quotes -- it ke
On Sat, Nov 14, 2020 at 2:03 PM ToddAndMargo via perl6-users
wrote:
> Just out of curiosity, why is the \n printed out literally here?
> p6 'my @x = <"aaa\n","bbb\n","ccc\n">; for @x {print @_};'
Your 'word quoting' <> is sort of like single quotes -- it keeps the
literal stuff. You could
use <<
Hi All,
Just out of curiosity, why is the \n printed out literally here?
$ alias p6
alias p6='perl6 -e'
p6 'my @x = <"aaa\n","bbb\n","ccc\n">; for @x {print @_};'
"aaa\n","bbb\n","ccc\n"
Many thanks,
-T
--
~~
Computers are like air conditioners.
They malf