>>>>> "SW" == Scott Wiersdorf <[EMAIL PROTECTED]> writes:

  SW> I don't have any additional uses for hashes to add, but I do have a
  SW> great hash initializer I picked up from Damian when he was in town a
  SW> few years ago (borrowing from your example):

  SW>   my @foos = qw( axxj djdj whwh ) ;
  SW>   my %is_a_foo;
  SW>   @[EMAIL PROTECTED] = (1) x @foos;

very old and i covered it in my hash slice tutorial:

        http://sysarch.com/Perl/hash_slice.txt

  SW> It runs *way* faster than the $_ aliasing does in the map (at least by
  SW> my benches). I thought that was fun when I saw it.

even faster is

        @[EMAIL PROTECTED] = () ;

and then use exists() to test instead of truth.

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Reply via email to