Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Relative Merits of References

by pbeckingham (Parson)
on May 11, 2006 at 15:11 UTC ( #548739=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Relative Merits of References
in thread Relative Merits of References

Now you're making an expensive copy of a hash. You could just be using the references with:

my ($r1, $r2) = @_; ... print "$_ $h1{$_}\n" for keys %$r1; print "$_ $h2{$_}\n" for keys %$r2;

Update:Thanks again David, yes, I meant:

print "$_ $r1->{$_}\n" for keys %$r1; print "$_ $r2->{$_}\n" for keys %$r2;



pbeckingham - typist, perishable vertebrate.


Comment on Re^3: Relative Merits of References
Select or Download Code
Re^4: Relative Merits of References
by Hue-Bond (Priest) on May 11, 2006 at 15:34 UTC
    print "$_ $h1{$_}\n" for keys %$r1;

    ITYM $h1->{$_}.

    --
    David Serrano

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://548739]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2014-12-19 13:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (82 votes), past polls