Then I guess I misunderstand what you are trying to do:
$find = "\x20"; $rep = "\x30";; $s = "The quick brown fox jumps over the lazy dog";; $s =~ s[$find][$rep]eg;; print $s;; The0quick0brown0fox0jumps0over0the0lazy0dog
In reply to Re^3: hex code passed from command line is interpreted literally in substitution
by BrowserUk
in thread hex code passed from command line is interpreted literally in substitution
by Allasso
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |