in reply to Re: Howto Avoid Memory Problem in List::MoreUtils
in thread Howto Avoid Memory Problem in List::MoreUtils

Hi graff,
Sorry for coming back to you again. I guess I have to resort to your way of doing it. As for your suggestion below:
save @very_big_array to a disk file
How could one implement it efficiently directly from the existing non-uniq array (as @very_big_array)?
  • Comment on Re^2: Howto Avoid Memory Problem in List::MoreUtils

Replies are listed 'Best First'.
Re^3: Howto Avoid Memory Problem in List::MoreUtils
by salva (Canon) on May 26, 2006 at 08:46 UTC
    use DB_File; tie my %uniq, "DB_File", "/tmp/uniq"; # you should use File::Temp here +! $uniq{$_} = 1 for @data; my @uniq = keys %uniq;
      Thanks a lot salva, I have read your latest posting with File::Temp.