Angel has asked for the wisdom of the Perl Monks concerning the following question:
What if you won't know the variable name so that if a variable ( like in a hash ) comes up it gets evaluated and thena sub containing the varname gets executedif( $var1 eq "value X" ) { #code }
if( $do_additional_test{ $var1 } eq "true" ) { &additional_test_module::$var1( object_vars{ $var1 ) ); )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: executing subroutines via variable
by Kanji (Parson) on Nov 19, 2002 at 17:16 UTC | |
|
Re: executing subroutines via variable
by broquaint (Abbot) on Nov 19, 2002 at 17:27 UTC | |
|
Re: executing subroutines via variable
by dakkar (Hermit) on Nov 19, 2002 at 17:21 UTC |