"The LHS of s/// is a regular expression, but the RHS is not. So, you can not expect them to behave the same way."
Nevertheless, RHS accepts the \xNN format if it is hardcoded in the script. It is only when it is passed from the terminal that it doesn't work. Why not? What makes it different when it is passed from the terminal?
Why not? What makes it different when it is passed from the terminal?
Why does interpolation happen only once? Because that is how it works
my $stuff = "\n newline gets interpolated at compile time";
my $other = "$stuff \n gets interpolated at run time";
@ARGV = qw( $stuff $other NOINTERPOLATION );
print "$stuff\n$other\n@ARGV\n"
__END__
newline gets interpolated at compile time
newline gets interpolated at compile time
gets interpolated at run time
$stuff $other NOINTERPOLATION