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

Jay Hannah jay at jays.net
Fri Jan 30 13:19:33 PST 2009


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




More information about the Omaha-pm mailing list