sanahmed has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
I am trying to concatenate all the files in a directory.
The file format is the following:
file 1:
>A
Amber, Amy
>B
Barbie, Bambie
file 2:
>A
Austin, Aurora
>C
Cathy, Candy
file 3:
>B
Bob, Barbara
>C
Cane, Carter
I want to concatenate the files so that the final file reads:
>A
Amber, Amy, Austin, Aurora, -, -
>B
Barbie, Bambie, -, -, Bob, Barbara
>C
-, -, Cathy, Candy, Cane, Carter.
I tried to use hash tables but I am finding it very hard. Is there an easy way to do this?
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hash of hashes?
by ww (Archbishop) on Jul 08, 2011 at 23:18 UTC | |
|
Re: hash of hashes?
by muba (Priest) on Jul 09, 2011 at 02:17 UTC | |
|
Re: hash of hashes?
by txixco (Novice) on Jul 09, 2011 at 04:25 UTC | |
by muba (Priest) on Jul 09, 2011 at 04:39 UTC | |
by Anonymous Monk on Jul 09, 2011 at 05:14 UTC | |
by muba (Priest) on Jul 09, 2011 at 08:13 UTC | |
by txixco (Novice) on Jul 10, 2011 at 01:07 UTC | |
by sanahmed (Initiate) on Jul 10, 2011 at 20:40 UTC | |
by sanahmed (Initiate) on Jul 10, 2011 at 20:42 UTC | |
by txixco (Novice) on Jul 11, 2011 at 14:44 UTC |