Hello world/Line printer: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: added comments.)
(→‎{{header|Perl 6}}: pull the comments out of the code and make them less confusing/dubious)
Line 534: Line 534:


=={{header|Perl 6}}==
=={{header|Perl 6}}==
<lang perl6>given open '/dev/lp0', :w { # Open the device for writing as the default
<lang perl6>given open '/dev/lp0', :w {
.say('Hello World!'); # Send it the string
.say: 'Hello World!';
.close;
.close;
# ^ The prefix "." says "use the default device here"
}</lang>
}</lang>

<tt>open</tt> returns a handle.<br>
<tt>given</tt> sets the handle as the current 'topic' inside the block.<br>
Bare method calls operate on the current topic.


=={{header|Phix}}==
=={{header|Phix}}==