Hi All,

I need to read a file into a buffer (NO CONVERSIONS!)
and then convert it to a string (again with no
conversions).

I have been doing this:

   for ( @$BinaryFile ) -> $Char { $StrFile ~= chr($Char); }

But it takes a bit of time.  What is the fastest way to do this?

I guess there is not a way to create/declare a variable that is
both Buf and Str at the same time?  That would mean I did not
have to convert anything.  I use to get away with this under
Module 2 all the time.

$ p6 'my $B = Buf.new(0x66, 0x66, 0x77); $B.Str ~= "z";'
Cannot use a Buf as a string, but you called the Str method on it
  in block <unit> at -e line 1

$ p6 'my $B = Buf.new(0x66, 0x66, 0x77); Str($B) ~= "z";'
Cannot use a Buf as a string, but you called the Str method on it
  in block <unit> at -e line 1


Many thanks,
-T

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A computer without Microsoft is like
a chocolate cake without the mustard
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to