Sun751 has asked for the wisdom of the Perl Monks concerning the following question:
but out of above code I am getting following warning:- "Useless use of private variable in void context at test.pl line 12" Any suggestion?Please, Cheerssub validate { my ($p,$s_no) = @_; my $s = 0; for ($s; $s<=$s_no; $s++) { my $command = $CFG::CFG[$s]->{'CMD'}; if ($command =~ /cd /) { $$p = $$p - 1; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Useless use of private variable
by ikegami (Patriarch) on Jul 15, 2009 at 05:17 UTC | |
|
Re: Useless use of private variable
by Sandy (Curate) on Jul 15, 2009 at 02:49 UTC | |
by Sun751 (Beadle) on Jul 15, 2009 at 03:10 UTC | |
by Marshall (Canon) on Jul 15, 2009 at 04:40 UTC | |
|
Re: Useless use of private variable
by jbt (Chaplain) on Jul 15, 2009 at 03:01 UTC |