irata73 has asked for the wisdom of the Perl Monks concerning the following question:
outputsuse strict; use Data::Dumper; { my( $key ) = 'Statistic::Test'; my( $val ) = [ 1, 2, 3, 4 ]; { no strict 'refs'; ${$key} = $val; } print Dumper( $Statistic::Test ); }
Name "Statistic::Test" used only once: possible typo at ref.pl line 12 +. $VAR1 = [ 1, 2, 3, 4 ];
Is there another way than using "no warnings 'once'" to avoid the "used only once" warning?
Thanks for your help!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: "used only once" for symbolic references
by Athanasius (Cardinal) on Jul 28, 2015 at 12:31 UTC | |
|
Re: "used only once" for symbolic references
by stevieb (Canon) on Jul 28, 2015 at 12:31 UTC | |
|
Re: "used only once" for symbolic references
by Anonymous Monk on Jul 28, 2015 at 10:58 UTC |