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

$rplc = "\\x41"; print $rplc; # prints the string \x41 $_ = "apples"; s@a@$rplc@; # variable containing the string \x41 used in RHS print; # - not interpolated to the char A $_ = "apples"; s@a@\x41@; # \x41 hardcoded into RHS print $_; # - interpolated to the char A __END__ outputs: \x41 \x41pples Apples
  • Comment on Re^8: hex code passed from command line is interpreted literally in substitution
  • Download Code

Replies are listed 'Best First'.
Re^9: hex code passed from command line is interpreted literally in substitution
by Anonymous Monk on Mar 10, 2011 at 17:06 UTC
    I don't understand; that is the original question, which has been answered
      Please point me sir, to the reply. Somehow I have missed it.