[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] code reduction :)




Yeah, any time you're doing "see if this exists or is found", you're talkin' hashes. Soooo much nicer than that loopy loopy stuff.


  my $pages = {
    "RR"      => [ "RR1","RR1_1","RR1_2","RR2","RR_more_rooms" ],
    "RR1"     => [ "RR1_2","RR_more_rooms" ],
  };


   my $pages = {
     RR      => [qw( RR1 RR1_1 RR1_2 RR2 RR_more_rooms )],
     RR1     => [qw( RR1_2 RR_more_rooms )],
   };

Quotes are no fun!

xoxo,
Andy


--
Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance