Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Introduction to anonymous arrays and hashes

by TedPride (Priest)
on Nov 06, 2004 at 12:16 UTC ( [id://405751]=note: print w/replies, xml ) Need Help??


in reply to Introduction to anonymous arrays and hashes

A bit messy perhaps, but it illustrates how anonymous hashes could be used to store your data:
use strict; my %meta; for (split(/\n\n/, join('', <DATA>))) { split(/\n/); $meta{$_[0]} = {'val', $_[1], 'cc', $_[2], 'wc', $_[3], 'wrc', $_[ +4]}; } print $meta{Keywords}{val}; __DATA__ Title Welcome to my website! 22 4 1 Keywords candy, food, pop, candy cane, soda, caffeine 31 5 2

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (9)
As of 2024-04-24 10:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found