in reply to Re^3: hex code passed from command line is interpreted literally in substitution
in thread hex code passed from command line is interpreted literally in substitution

I am trying to pass those expressions from the command line. It works fine the way you have your code written, but try this:
my ($find, $rep) = @ARGV; $s = "The quick brown fox jumps over the lazy dog";; $s =~ s[$find][$rep]eg;; ./arg.pl '\x20' '\x30' #prints: The\x30quick\x30brown\x30fox\x30jumps\x30over\x30the\x30lazy\x30dog
  • Comment on Re^4: hex code passed from command line is interpreted literally in substitution
  • Download Code