in reply to Re^2: Importing dynamic variables
in thread Importing dynamic variables

Ah,
package 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;
should work

Replies are listed 'Best First'.
Re^4: Importing dynamic variables
by Anonymous Monk on Nov 17, 2006 at 01:46 UTC
    Except it doesn't if I use strict. Any ideas?
      Uh, yeah, it's not supposed to work if you use strict. That's the whole point. Stop doing it.