coreywride has asked for the wisdom of the Perl Monks concerning the following question:
The right-hand part of the expression is stored in a variable I call $rValue.my $IsNumber = '/^\d+$/';
Now I want to convert the right-hand IsNumber variable into the actual regex. I have no idea how to do this - and no idea even what to look for in the documentation. Intuition has me trying things like this (none of which work).$rValue = "$IsNumber";
Again, I want the resulting value of $rValue to be '/^\d+$/' Any help would be fantastic.$rValue = $$rValue $rValue = `eval $rValue`
edited: Tue Oct 1 18:35:39 2002 by jeffa - added code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: double deference a variable
by jeffa (Bishop) on Oct 01, 2002 at 18:11 UTC | |
|
Re: double deference a variable
by hopes (Friar) on Oct 01, 2002 at 18:27 UTC | |
|
Re: double deference a variable
by Helter (Chaplain) on Oct 01, 2002 at 19:27 UTC | |
|
Re: double deference a variable
by bart (Canon) on Oct 01, 2002 at 22:40 UTC | |
|
Re: double deference a variable
by Anonymous Monk on Oct 02, 2002 at 05:56 UTC | |
|
Re: double deference a variable
by coreywride (Initiate) on Oct 01, 2002 at 18:06 UTC |