I didn't read your code in detail, but when de-referencing a subscript'ed thing, you need to use {} to show "@" what it is operating upon, eg.. @{$fldref[3]}. If $fldref is just a single ref, then @$fldref works. But this doesn't work if $fldref has a subscript.
In reply to Re^3: foreach doesn't select array element
by Marshall
in thread foreach doesn't select array element
by december
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |