McMahon has asked for the wisdom of the Perl Monks concerning the following question:
yields the message "Useless use of private variable in void context at script.pl line 6".use warnings; use strict; my @commands = 'print "hello", print "world"'; foreach my $command(@commands) { $command; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Interpret array elements as actual Perl?
by Fletch (Bishop) on May 28, 2004 at 16:59 UTC | |
by McMahon (Chaplain) on May 28, 2004 at 17:02 UTC | |
|
Re: Interpret array elements as actual Perl?
by calin (Deacon) on May 28, 2004 at 18:24 UTC | |
by meetraz (Hermit) on May 28, 2004 at 18:38 UTC | |
by calin (Deacon) on May 28, 2004 at 18:57 UTC |