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

It is a program that iterates through several files and processes them. I wouldn't want to type all of that on the command line every time.

But that is exactly what you are doing every time you use string eval, you're creating a mini perl program, from stuff you typed on the commandline, might as well just use -E and avoid eval altogether

$ perl -E " say @ARGV" say 6 say6 $ perl -E " eval qq!@ARGV!" say 6 6

I am also wondering why two other monks suggested it.

Branfart :) It is the shortest answer to your question, but its also the most dangerous one. See String::Interpolate

  • 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 11, 2011 at 13:16 UTC
    Please enlighten me then on how eval works. I just don't see any reason why it would execute anything other than what I give it, ie, s///.

    Question answered