Munching squares: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) m (→{{header|Perl 6}}: fix file open error handling) |
|||
Line 902: | Line 902: | ||
Here's one simple way: |
Here's one simple way: |
||
<lang perl6>my $ppm = open("munching0.ppm", :w) |
<lang perl6>my $ppm = open("munching0.ppm", :w) orelse .die; |
||
die "Can't create munching.ppm: $!"; |
|||
$ppm.print(q :to 'EOT'); |
$ppm.print(q :to 'EOT'); |
||
Line 931: | Line 930: | ||
my $PPM = open "munching1.ppm", :w |
my $PPM = open "munching1.ppm", :w orelse .die; |
||
$PPM.print: qq:to/EOH/; |
$PPM.print: qq:to/EOH/; |