On 02/14/2011 02:41 AM, Carl Mäsak wrote:
--snip--
to me that a Buf could be output without first having been converted
to a Str. A conversion may or may not be necessary for it to work.
S32/IO says that IO.write will output a Buf.
On Feb 14, 2011, at 12:37 AM, Richard Hainsworth wrote:
-
I am not too clear on how pack works in perl5.
Is there a work around in perl6 to achieve the same result, viz., not
using pack?
Richard
On 02/14/2011 02:41 AM, Carl Mäsak wrote:
Richard (>):
I came across the idiom
print "P4\n$w $h\n";
for my $y (0..$h-1) {
print pack 'B*', pack 'C*',
Richard (>):
> I came across the idiom
>
> print "P4\n$w $h\n";
> for my $y (0..$h-1) {
> print pack 'B*', pack 'C*', map dot($_, $y), 0..$w-1;
> }
>
> in a perl5 program for outputting dots in a graphical format. dot() produces
> a 0 or -1.
>
> I found the 'pack' function in perl6, but it does