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

What?
  • Comment on Re^7: hex code passed from command line is interpreted literally in substitution

Replies are listed 'Best First'.
Re^8: hex code passed from command line is interpreted literally in substitution
by Allasso (Monk) on Mar 10, 2011 at 14:32 UTC
    $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
      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.