in reply to Re: hash ref 101
in thread hash ref 101

Also maybe take a look at the Perl Monks tutorial Data Type: Hash and the many links therefrom, and at some of the tutorials and FAQs at perl.org

Replies are listed 'Best First'.
Re^3: hash ref 101
by gmoque (Acolyte) on Dec 18, 2008 at 01:59 UTC

    Thanks for all your posts

    I think I will take the solution from eleron because this function will be used by more people that is not experience with Perl programming and I don't want to confuse them.

    I am planning to use an OO module, right now I have a simple module but my design requires and object to keep track on several variables.

    Regarding the OO implementations with arrays I don't think that will be too much problem (I hope) because I have seen in many modules the implementation in this way:

    my $object = new Object(); $object->hash( uno => 'one', dos => 'two', tres => 'three', );
    And in the module I will have
    sub hash { my $class = shift; my $param = {@_}; $class->{uno} = $param->{uno}; print $class->{uno}, "\n"; }

    So this way I can save in the object the variable with value "one".