wouldbewarrior has asked for the wisdom of the Perl Monks concerning the following question:
| I have a great big file that contains an unsorted, multilingual lexicon, that I am sorting, based on language. I've written code to do this a couple times, and am now looking for a more elegant solution to the problem. My question is, how can I (if there is, indeed, a way) print certain elements from the hash to different files, without explicitly specifying the file to which I want to print.
My hash looks something like this $lexica{$language}{$word}{$counter}{$transcription} What I would like to do is print everything correctly, according to language, with a single for loop, which, in my head, looks something like this:
|
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Printing different hash elements to different files
by kvale (Monsignor) on Apr 15, 2004 at 22:30 UTC | |
by tilly (Archbishop) on Apr 16, 2004 at 01:20 UTC | |
|
Re: Printing different hash elements to different files
by tilly (Archbishop) on Apr 16, 2004 at 01:29 UTC |