On 2/7/19 11:22 AM, Curt Tilmes wrote:
On Thu, Feb 7, 2019 at 2:14 PM ToddAndMargo via perl6-users <perl6-users@perl.org <mailto:perl6-users@perl.org>> wrote:

    What is the easiest way to get both print and say to print $i below
    in Hex?

    $ p6 'my Buf $x=Buf.new(0xAE,0x5D); my int16 $i=0x5DAE; say $x; say $i;'

    Buf:0x<AE 5D>

say $i.base(16)

Hi Curt,

   A thing of beauty!  Thank you!


$ p6 'my Buf $x=Buf.new(0xAE,0x5D); my int16 $i=0x5DAE; say $x; say $i.base(0x10); print $i.base(16) ~ "\n"'

Buf:0x<ae 5d>

Reply via email to