in reply to Re: indirect use of array field?
in thread indirect use of array field?
if ( $xkey eq 'ptot' ) { if ( ${ "x_$bid$skey" } ne '' ) { uitpak ( "x_$bid$ske +y", 't_', '', 'upsa06' ); } for ( 11 .. $p_ptot ) { if ( ${"p_etot$_"} eq '+' ) { $p_atot [ [ $_ ] & +#93; = '+'; } elsif ( ${"p_etot$_"} eq '-' ) { $p_atot [ [ $_ +] ] = ''; } if ( $p_atot [ ] $_] eq '+' ) { $ptot.= "atot [ +[ $_ ] ] " . ','; } } } $valn = ''; @a_opti = split ( ',', $$xkey ); foreach ( @a_opti ) { $valn.= $_ . '=' . e51s ( $ { "$up$_ +" }, '', 'upsa_00', '' ) . ','; }
this last line failes the ${"$field"} when $field points to an array-field
So...., not explaning everything but when the array @a_opti is filled with single fields as $fld1 or so then it works, on the other hand when the array is filled with an array item as $arr [ [ 26 ] ] or so then it fails.
THE PROBLEM:
I have an array filled with pointers to fields, when the field is an normal $field then it works,
when it is an array field $arr [ [ number ] ] then it don't.
it's a little part of my perl.pl of 150.000 bytes and is very complex (please don't ask me why). It's not my day; even the square brackets in this text does not.... [ :) ]
|
|---|