Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to sort data coming from file. 1st file has
words that are in specific order like this: (not alphabetic)
GAVSTE
GAVARC
GAVADA
GAVIMM
GAVSP.
add so on...
It is "order quide" for sorting
2nd file in flatfile (delimiter is "|"):
GAVARC 10.3. Tahkoluoto 1m
SOMMOL 10.3. Tahkoluoto 7m
GAVSTE 7.4. Preiviiki 1p
GAVARC 7.4. Preiviiki 2p
SOMMOL 16.3. Kallo 6m
Printig should look like this:
GAVSTE 7.4. Preiviiki 1p
GAVARC 10.3. Tahkoluoto 7m
GAVARC 7.4. Preiviiki 1p
SOMMOL 10.3. Tahkoluoto 7m
SOMMOL 16.3. Kallo 6m
Is this possible at all?
PH
ps. Hope it's readable now
words that are in specific order like this: (not alphabetic)
GAVSTE
GAVARC
GAVADA
GAVIMM
GAVSP.
add so on...
It is "order quide" for sorting
2nd file in flatfile (delimiter is "|"):
GAVARC 10.3. Tahkoluoto 1m
SOMMOL 10.3. Tahkoluoto 7m
GAVSTE 7.4. Preiviiki 1p
GAVARC 7.4. Preiviiki 2p
SOMMOL 16.3. Kallo 6m
Printig should look like this:
GAVSTE 7.4. Preiviiki 1p
GAVARC 10.3. Tahkoluoto 7m
GAVARC 7.4. Preiviiki 1p
SOMMOL 10.3. Tahkoluoto 7m
SOMMOL 16.3. Kallo 6m
Is this possible at all?
PH
ps. Hope it's readable now
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Sorting with perl
by Abigail-II (Bishop) on Aug 12, 2002 at 13:00 UTC | |
by fruiture (Curate) on Aug 12, 2002 at 13:14 UTC | |
by Abigail-II (Bishop) on Aug 12, 2002 at 13:56 UTC | |
by fruiture (Curate) on Aug 12, 2002 at 14:35 UTC | |
by Abigail-II (Bishop) on Aug 12, 2002 at 14:51 UTC | |
Re: Sorting with perl
by RMGir (Prior) on Aug 12, 2002 at 13:06 UTC | |
Re: Sorting with perl
by demerphq (Chancellor) on Aug 12, 2002 at 12:49 UTC | |
Re: Sorting with perl
by fruiture (Curate) on Aug 12, 2002 at 13:09 UTC | |
Re: Sorting with perl
by I0 (Priest) on Aug 13, 2002 at 07:35 UTC |
Back to
Seekers of Perl Wisdom