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

Re: [Omaha.pm] uppercasing some things in complex nested structures



Travis McArthur wrote:
sub uppercase_everything {
   my ($self, $qualifiers) = @_;
   if (ref($qualifiers) eq "HASH")
   {
       # Call uppercase_everything on each hash element
   }
   elsif (ref($qualifiers) eq "ARRAY")
   {
       # Call uppercase_everything on each array element
   }
   else
   {
       # Just uppercase like you were doing
} }


I like it! Cleaner than mine and depth agnostic! Thanks!  :)

j