I’m writing a script for IRC and sometimes I might need to use a color. Normally I do it this way
my $C = chr(3);
$C is the control code used for color but I’ve seen some other script that escapes it something like “\x\v…”. How do I get the correct encoded version of that? I tried Data::Dumper but I didn’t find it. I hope this question makes sense.
The way to specify
chr(3)with a hexadecimal escape code is to use:or, in octal:
or, as a control code:
See perldoc perlop: