in reply to Re^2: Useless use of private variable
in thread Useless use of private variable
Update: Looked again. $CFG::CFG[$s]->{'CMD'}; also looks a bit odd. I'd like to see some more code and explanation of what you think that this CFG data structure looks like. Maybe you intend an array of Hash? I'm not sure from this code. $CFG isn't defined anywhere that I can see. What I said above shouldn't actually matter from functionality or compile errors. If you are going to use a ref, passing a ref to this $CFG thing is the place. Normally passing a ref to a scalar is not necessary or desirable as Perl can return multiple lvalues.
Update Again: I didn't see the missing $s=0 in the for loop. Even so this code sans $CFG::CFG[$s]->{'CMD'}; compiled and ran on my Perl 5.10 machine.
|
|---|