When run, that prints out:use strict; use warnings; use Data::Dump; { my %toys = ( frisbee => 5 ); dd \%toys; play_around(\%toys); dd \%toys; } sub play_around { die "expected one arg" unless @_ == 1; die "expected hash arg" unless ref($_[0]) eq "HASH"; our %t; local *t = $_[0]; $t{leggo} = "yes"; }
See? Nice and easy!{ frisbee => 5 } { frisbee => 5, leggo => "yes" }
In reply to Re: passing of variables
by tchrist
in thread passing of variables
by itsscott
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |