Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: use of useless void in contextby JavaFan (Canon) |
on Feb 07, 2009 at 17:36 UTC ( [id://742141]=note: print w/replies, xml ) | Need Help?? |
$content =~ s/(\$[a-zA-Z0-9\{\'\}_]+)/ eval($1) /ge if $1;The '$1' after the if would refer to the $1 set by the last successful match. Also, if you want to eval the content of $1, no need to do both eval($1) and /e. Just /e should do. $content =~ s/(\$[a-zA-Z0-9\{\'\}_]+)/ if $1(eval($1)) /ge;That doesn't make any sense. Since you don't tell us what you try to do, I won't bother offering suggestions.
In Section
Seekers of Perl Wisdom
|
|