SPUG: Symbolic references ???

Orr, Chuck (NOC) chuck.orr at cingular.com
Wed Jan 25 12:50:17 PST 2006


 


 
Hello,
 
I have a group of 5 arrays, named as follows:
 
my @ofcrte;
my @pxrte;
my @acrte;
my @farte;
my @ftrte;
 
I would like to push something on to one of them per iteration of a
loop, the pushee determined by a variable named $lc_table.
 
If I read pgs 16 & 17 of the leopard (advanced perl programming)
correctly, I should be able to use a symbolic reference to push to the
appropriate array depending on the contents of the $lc_table variable.
I have turned strict refs off within the loop.
 
here is my push line:
 
push @$lc_table, "rep bla bla bla bla bla";
 
when I then print the above listed arrays, they have nothing in them.
However, if I print "@$lc_table"; within the loop, there are elements in
the array.  Any suggestions?

If anyone can help me and has time to look at a little more code, I
would be glad to send it.

Thanks for your help,
Chuck Orr
chuck.orr at cingular.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/spug-list/attachments/20060125/9b81ffd5/attachment.html


More information about the spug-list mailing list