Front page | perl.perl6.users |
Postings from February 2011
Pack in perl6
Thread Next
From:
Richard Hainsworth
Date:
February 13, 2011 08:21
Subject:
Pack in perl6
Message ID:
4D580513.6010902@rusrating.ru
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
Thread Next
-
Pack in perl6
by Richard Hainsworth