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
given open '/dev/lp0', :w { .say: 'Hello World!'; .close; }
Last updated 1 year ago