$stream.write ($record); # just what I need my int16 $x = 42; $stream.write ($x); # emits 2 bytes, exactly as stored in the primitive $stream.print ($x); # emits characters "4" and "2" in the proper encoding