Hello world/Line printer: Difference between revisions

Content added Content deleted
(removed duplicated c++ code)
(→‎{{header|Ruby}}: Use lpr to print.)
Line 214: Line 214:


=={{header|Ruby}}==
=={{header|Ruby}}==
Assumes that <code>lpr</code> command reaches printer.
{{incorrect|Ruby|It prints to standard out rather than to a line printer (which is a peripheral device).}}

<lang ruby>
puts "Hello World"
<lang ruby>open("| lpr", "w") { |f| f.puts "Hello World!" }</lang>
</lang>


=={{header|Tcl}}==
=={{header|Tcl}}==