in reply to Re^2: Importing dynamic variables
in thread Importing dynamic variables
should workpackage gen_var; use banana; my @variables = qw(one two three); my $counter = 1; foreach my $variable (@variables) { no strict; my $ns_var = caller() .'::'.$variable; *$ns_var = \banana->new($counter++); } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Importing dynamic variables
by Anonymous Monk on Nov 17, 2006 at 01:46 UTC | |
by BUU (Prior) on Nov 17, 2006 at 02:31 UTC |