in reply to Re^3: Using a sting with a variable name
in thread Using a sting with a variable name

Let's hope you trust the template...
my $one = '$var[ system qw( rm -rf / ) ]';
Even the following would do with the method you used:
my $one = 'system qw( rm -rf / )';

Replies are listed 'Best First'.
Re^5: Using a sting with a variable name
by wol (Hermit) on May 11, 2009 at 17:28 UTC
    Sometimes you really need to know whether a variable is defined; wiping the hard drive every time you run the script is just the price of that knowledge. ;-)

    --
    use JAPH;
    print JAPH::asString();

Re^5: Using a sting with a variable name
by bingohighway (Acolyte) on May 12, 2009 at 08:37 UTC
    I'm not going to use this method... I have actually implemented it using hashes. I mainly wondered if one wanted to do it how would they go abut doing it. Lots of replies! :-)