in reply to Re^2: Swap Ascii chr() for null string
in thread Swap Ascii chr() for null string
But you told it to match the string chr12! You can't place code in a string literal and expect it to be executed.
You want any of the following:
s/\014//g; # By octal s/\x0C//g; # By hex s/\x{C}//g; # By hex (leading zeros allowed) s/\N{U+C}//g; # By hex (leading zeros allowed) s/\N{FORM FEED}//g; # By name s/\N{FF}//g; # By alias
You could also use the character literally.
my $ff = chr(12); s/\Q$ff\E//g;
|
|---|