A peace of my perl creation:
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.... [ :) ]


In reply to Re^2: indirect use of array field? by gavla
in thread indirect use of array field? by gavla

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.