Re: fun with hashes!
Brian Duggan <[email protected]> Sun, 25 Nov 2007 11:45:48 -0500
| Newsgroups | gmane.comp.lang.perl.fun |
|---|---|
| Message-ID | <[email protected]> |
On Friday, November 23, Uri Guttman wrote:
> one goal i have is to
> list and explain as many different uses for hashes as reasonably
> possible.
I often use them to divide one big file into several
small files named after some field in each line, e.g.
perl -MIO::File -ane '($fds{$F[1]} ||= IO::File->new(">$F[1]"))->print($_)' < bigfile
Brian