in reply to Re^2: Filtering very large files using Tie::File
in thread Filtering very large files using Tie::File
See tie and DB_File. A tie'd hash simply moves the storage of the hash onto disk, at the (rather huge) cost of access speed.
A hash is a data structure optimized for fast lookup by a key value. An array can only look up data fast by its index, and the array assumes that all index values are sequential. You haven't told us whether that's the case, so I'm using a hash.
For the "postfix increment" operator ("++"), see perlop. It is basically $seen{ $key } = $seen{ $key } + 1, except shorter.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Filtering very large files using Tie::File
by elef (Friar) on Nov 26, 2010 at 18:59 UTC | |
by eyepopslikeamosquito (Archbishop) on Nov 26, 2010 at 20:41 UTC | |
by Corion (Patriarch) on Nov 26, 2010 at 20:56 UTC | |
by elef (Friar) on Nov 26, 2010 at 21:38 UTC | |
by ikegami (Patriarch) on Nov 27, 2010 at 21:28 UTC |