Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^4: Returning hash reference from a sub

by tobias_hofer (Friar)
on Mar 18, 2013 at 14:10 UTC ( #1024054=note: print w/replies, xml ) Need Help??

in reply to Re^3: Returning hash reference from a sub
in thread Returning hash reference from a sub

The line %final_data = @loop_data will take the array and map the elements:

my @a = ('H','e','l','o'); my %fus = @a;
so you will get
%fus: H -> e, l -> o
In case you assign an odd list to %final_data the code will break!
What about crating and array of hashes? and return the reference to the array?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024054]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2017-04-30 07:47 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (534 votes). Check out past polls.