Help for this page

Select Code to Download


  1. or download this
    sub set : lvalue {
      @_ == 1 ? $_[0] : set($_[0]{$_[1]},@_[2..$#_]);
    }
    
  2. or download this
    use Data::Dumper;
    sub set : lvalue {
      @_ == 1 ? $_[0] : set($_[0]{$_[1]},@_[2..$#_]);
    ...
    set($h, qw/baz troz/) = 42;
    set($h, qw/baz poit qux/) = 17;
    print Dumper($h);