Think of it this way:
No /e means the right hand side of the s/// is a double quoted string. One makes the right hand side an expression and the result of evaluating that expression is the substituted value. Two makes the right hand side a string eval and the return from that is the right side.
Your first and second case are the equivalent of "$1" and $1 respectively, which since $1 contains the string value '10+4' works out to the same thing. The last is eval "$1" which actually does what you're expecting from the second.
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: /e in regexes
by Fletch
in thread /e in regexes
by waldner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |