in reply to hash ref 101

use strict; use Data::Dumper; hash({ uno => 'one', dos => 'two', tres => 'three' }); sub hash { print Dumper @_; my ($param) = @_; print $param->{uno}, "\n"; }

Replies are listed 'Best First'.
Re^2: hash ref 101
by eleron (Novice) on Dec 17, 2008 at 11:35 UTC
    Also this way
    hash( uno => 'one', dos => 'two', tres => 'three', ); sub hash { my $param = {@_}; print $param->{uno}, "\n"; }