in reply to Saving an array to a disk file
At least in theory, using a hash with on-disk storage (i.e. DB_File) is a better way with O(N) cost:
my @data = qw(foo bar foo bar bar doz); use DB_File; use File::Temp qw(tempfile); my ($fh, $fn) = tempfile(UNLINK => 1); tie my %u, 'DB_File', $fn, O_RDWR, 0600; $u{$_} = undef for @data; @data = keys %u; print "@data\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Saving an array to a disk file
by BrowserUk (Patriarch) on May 26, 2006 at 14:23 UTC | |
|
Re^2: Saving an array to a disk file
by Anonymous Monk on May 27, 2006 at 14:30 UTC | |
by salva (Canon) on May 27, 2006 at 14:51 UTC |