in reply to Re^8: 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 also wondering why two other monks suggested it.

I believe you are referring to bart and I.

I simply said it's required to execute Perl code. I never suggested that you use Perl code as inputs — that extremely rarely makes sense — so I never suggested that you use eval.

  • Comment on Re^9: hex code passed from command line is interpreted literally in substitution
  • Download Code

Replies are listed 'Best First'.
Re^10: hex code passed from command line is interpreted literally in substitution
by Allasso (Monk) on Mar 10, 2011 at 21:09 UTC
    I'm sorry, I retract that.

    Would you agree then with AM, that it would be possible for eval to execute a system command if the appropriate code were typed in and used as one of the variables in the string below:
    eval "s/$arg_1/$arg_2/";

      Most definitely:

      $arg1 = '//; system( ... ); #';

      Or without even breaking out of the s///:

      $arg1 = '${ system( ... ) }';
        ooooooh....

        btw, what does the # do?