#!/usr/bin/perl use strict; use Data::Dumper; my_sub({foo => 'bar', oof => 'wha'}); sub my_sub { my $ref = shift; my %args = ( foo => 'oop', pah => 'meh', oof => 'off', %{$ref} ); warn Dumper(\%args); }
In reply to Re: Hash reference as a parameter
by saberworks
in thread Hash reference as a parameter
by ramya2005
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |