in reply to Re^2: Trying to optimize de-referenced hash slice without scope variables...
in thread Trying to optimize de-referenced hash slice without scope variables...
#!/usr/bin/perl use Data::Dumper; %xx = ( a => 1, b => 2 ); sub inputBox{ @{$_[3]}{'a','b','c','d'}; } sub inputBox2{ my $data = $_[3]; @$data{'a','b','c','d'}; } print Dumper (inputBox( 1,2,3,\%xx)); print Dumper (inputBox2( 1,2,3,\%xx));
|
|---|