EchoAngel has asked for the wisdom of the Perl Monks concerning the following question:
note that USA correspond to PIZZA and CANADA correspond to MAPLE and etc ... now i sorted the array by highest length to lowest length@CATEGORY = ("USA", "CANADA" , "EUROPE" , "TAIWAN"); @FOOD = ("PIZZA" , "MAPLE" , "EURO" , "INDEPENDENCE");
I have a lot of file names sorted in @FILENAMES. I want to sort this list based on longest names to shortest (@FOOD) since it's possible to subsets of search names and put them into the individual countries . Example@FOOD = ("INDEPENDENCE", "MAPLE", "PIZZA" , "EURO");
@FILENAMES = ("MAPLESTEA.txt" , "HOTPIZZA.txt" , "EURODOLLAR.txt"); end result i want to be is $HASH{"CANADA"}{"MAPLESTEA.txt"} = 1; $HASH{"USA"}{"HOTPIZZA.txt"} = 1; $HASH{"EUROPE"}{"EURODOLLAR.txt"} = 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Organizing Question
by ccn (Vicar) on Sep 03, 2004 at 22:48 UTC | |
|
Re: Organizing Question
by sintadil (Pilgrim) on Sep 03, 2004 at 22:48 UTC | |
|
Please pick a more descriptive title
by FoxtrotUniform (Prior) on Sep 03, 2004 at 22:36 UTC |