in reply to use of useless void in context
$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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: use of useless void in context
by romandas (Pilgrim) on Feb 09, 2009 at 10:58 UTC | |
by JavaFan (Canon) on Feb 09, 2009 at 11:14 UTC |