lpoht has asked for the wisdom of the Perl Monks concerning the following question:
@tables is the list of names and $x is a variable used in a for loop. I get the error that I cannot use an undefined value as an array reference on this line, yet $tablename is most definitely defined. It works after saying "no strict 'refs';" but I'm wondering if there is a way to accomplish this without soft refs. Thanks for your input.my $tablename =$$tables[$x]; my @{$tablename};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Create an array with another variable
by demerphq (Chancellor) on Jun 28, 2003 at 08:42 UTC | |
|
•Re: Create an array with another variable
by merlyn (Sage) on Jun 28, 2003 at 07:45 UTC | |
|
Re: Create an array with another variable
by belg4mit (Prior) on Jun 28, 2003 at 07:15 UTC | |
|
Re: Create an array with another variable
by belden (Friar) on Jun 28, 2003 at 16:47 UTC | |
by PodMaster (Abbot) on Jun 29, 2003 at 05:30 UTC | |
|
Re: Create an array with another variable
by yosefm (Friar) on Jun 28, 2003 at 14:26 UTC |