in reply to Printing Hexadecimal Characters

Is the following the correct way of getting the same output with Perl

No. Don't over-think it. ;-) Try

print PRN "\x02L\n";

-sauoq
"My two cents aren't worth a dime.";