in reply to stumped on a complex data structure

Based on the fact that your hash keys are numeric, and that you depend on the output being ordered, I think you need an Array of Arrays

my $output = ""; my @AofA = ( [ '1;;;;;;;', ';;;;;;;;', ';;;;;;;;', ';;LINE;;SVC;LINE;ACCT;VIEW;' ], [ '1;;', ';;;', ';;;', ';LINE;;' ], [ '1;;;;;', ';;;;;;', ';;;LAST;;;', ';UPDT;SRCE;UPDT;UPDT;WORK;' ] ); foreach my $array_ref ( @AofA ) { $output .= $array_ref->[3]; } print "$output\n";
output is

;;LINE;;SVC;LINE;ACCT;VIEW;;LINE;;;UPDT;SRCE;UPDT;UPDT;WORK;

If you do want a hash, then you will have to sort the hash keys to get teh output in the order you want

- j