in reply to indirect use of array field?

#!/usr/bin/perl $x_point = "total[26]"; $total[26] = "foo"; $result = eval "\$$x_point"; print "result=$result\n"; # foo

but having to do this at all usually is an indication of a design problem in the first place :)

Replies are listed 'Best First'.
Re^2: indirect use of array field?
by gavla (Initiate) on Mar 04, 2010 at 20:28 UTC
    thank you very much, now it works: when you store info, also have to get it back
    eval ( "\$$ui2$ui8 = d51s ( \$ui7, \$ui5, \$ui4 )" );
    this works to thanks