[Omaha.pm] code reduction :)

Andy Lester andy at petdance.com
Wed Jan 2 09:16:39 PST 2008


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 at petdance.com => www.petdance.com => AIM:petdance






More information about the Omaha-pm mailing list