bioinformatics has asked for the wisdom of the Perl Monks concerning the following question:
I get all of the arrays printed out succesively. Each array is composed of several thousand data strings followed by a \n. From an Excel perspective, it would be the equivalent of 4 columns of several thousand rows (per array). What I am aiming to do is get these arrays printed out in succesive columns, so (again in Excel terms) it would be a total of 4 columns x 5 arrays =20 columns total. Anyway, I know that the best way to do this is to say print "@a,@b,@c";so that they are all printed simultaniously. Hence, I have fished the keys of the array out (the name of the arrays themselves) using my $scalar= join( ', ',keys %data); Therin lies my problem however. I have the names of the arrays in a scalar, but like calling a program in a different subdirectory, need to be able to pull out the names and figure out how to print the arrays themselves, rather than the names of the arrays. I hope I have elucidated my goals well. Thanks so much!!!for $zz(keys %data) { print OUTPUT "@{ $data{$zz} }" }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Custom printing of an HoA
by blokhead (Monsignor) on Oct 03, 2003 at 18:39 UTC | |
by Limbic~Region (Chancellor) on Oct 03, 2003 at 19:41 UTC | |
by bioinformatics (Friar) on Oct 03, 2003 at 19:16 UTC | |
|
Re: Custom printing of an HoA
by Limbic~Region (Chancellor) on Oct 03, 2003 at 18:39 UTC | |
|
Re: Custom printing of an HoA
by hardburn (Abbot) on Oct 03, 2003 at 18:45 UTC | |
by bioinformatics (Friar) on Oct 03, 2003 at 19:14 UTC | |
|
Re: Custom printing of an HoA
by BrowserUk (Patriarch) on Oct 03, 2003 at 19:27 UTC |