in reply to Re: Regular expression match and substitution
in thread Regular expression match and substitution
I will be using eval on the string later on. However, before executing the eval I ensure that all variables have been defined. Why isn't this a good idea?
Does eval() work on string's?
$b = "hello"
$strconcat = "$b_world"
after subs...
$strconcat = "$sym{'$b'}_world"
<code> $tmp = eval("$sym{'$b'}_world") print "\$strconcat = $tmp\n"; <\code>
I get the following error Use of uninitialized value in concatenation (.) or string at ./genParse.pl line 418, <DATA> chunk 1.
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regular expression match and substitution
by ww (Archbishop) on Nov 09, 2004 at 19:09 UTC | |
|
Re^3: Regular expression match and substitution
by ikegami (Patriarch) on Nov 09, 2004 at 19:20 UTC | |
by pip9ball (Acolyte) on Nov 09, 2004 at 19:42 UTC | |
by ikegami (Patriarch) on Nov 09, 2004 at 21:35 UTC |