Hello world/Line printer

my $lp = open '/dev/lp0', :w;
$lp.say: 'Hello World!';
$lp.close;

Or using given to avoid having to write the variable name repeatedly:

given open '/dev/lp0', :w {
    .say: 'Hello World!';
    .close;
}