kfarr2 has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to join each element in each of the arrays & then print the joined line to a file.%HofA{0} = 1;;;;;;; ;;;;;;;; ;;;;;;;; ;;LINE;;SVC;LINE;ACCT;VIEW; %HofA{1} = 1;; ;;; ;;; ;LINE;; %HofA{2} = 1;;;;; ;;;;;; ;;;LAST;;; ;UPDT;SRCE;UPDT;UPDT;WORK;
Example 1: Joining the first element in all arrays should produce:
Example 2: Joining the last element in the sample data in all arrays should produce:1;;;;;;;1;;1;;;;;
I've found many references and code snippets when the number of keys is known, but I'm not that lucky. Since the number of keys depends on the input, I suspect an eval statement is in my future. I've read perldsc, perlfunc & scanned the ref/tut and Q&A and have no clue how to start. Could one of you wizards point me in the correct direction? Thanks.;;LINE;;SVC;LINE;ACCT;VIEW;;LINE;;;UPDT;SRCE;UPDT;UPDT;WORK;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: stumped on a complex data structure
by ikegami (Patriarch) on Nov 15, 2004 at 19:12 UTC | |
|
Re: stumped on a complex data structure
by jimbojones (Friar) on Nov 15, 2004 at 19:39 UTC | |
|
Re: stumped on a complex data structure
by BrowserUk (Patriarch) on Nov 15, 2004 at 19:39 UTC | |
by ikegami (Patriarch) on Nov 15, 2004 at 19:43 UTC | |
by BrowserUk (Patriarch) on Nov 15, 2004 at 19:47 UTC | |
by kfarr2 (Novice) on Nov 16, 2004 at 12:51 UTC | |
by Anonymous Monk on Nov 16, 2004 at 21:20 UTC | |
|
Re: stumped on a complex data structure
by TedPride (Priest) on Nov 16, 2004 at 15:24 UTC |