Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Array of Hashes

by ~~David~~ (Hermit)
on Oct 28, 2011 at 16:55 UTC ( [id://934448]=note: print w/replies, xml ) Need Help??


in reply to Array of Hashes

What happens when you make everything look pretty:
@files = (); sub filer { $filepath_rs = $File::Find::name; if(-f $filepath_rs) { $metadata = {}; #should instantiate a new hash object and retu +rn a scalar reference. $metadata->{path} = $filepath_rs; print $metadata->{path}; #prints out fine push @files, $metadata; #should add reference to hash to array +. } } find(\&filer, $mydir); foreach my $file (@files) { print $file->{path}; #??? }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-25 14:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found