Help for this page

Select Code to Download


  1. or download this
    sub foo{
        my ($hashref) = @_;
    ...
    my %hash = (Gobs=>'many', of=>'loads', data=>'Huge');
    ...
    foo( \%hash);
    
  2. or download this
    sub foo{
        my (%hash) = @_; #! Wrong!
    ...
    }
    ...
    foo( %hash ); #! Wrong!
    
  3. or download this
    exists $b{$k} or delete $a{$k} while ($k,$v) = each %a;
    
  4. or download this
    exists $b{$k} and $c{$k}=$v while ($k,$v) = each %a