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 not seem to work the same.

[I am converting the mandelbrot benchmark in Alioth shootout into perl6]

Richard


Reply via email to