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

Re: Acessing an array element in a hash

by OM_Zen (Scribe)
on Mar 26, 2003 at 16:43 UTC ( #245989=note: print w/replies, xml ) Need Help??

in reply to Acessing an array element in a hash


The code to populate the hash assuming is like the below , you can access the elements of the array of the hash of the hash like this
my $ascalar = { 'a' => {'a' =>'valueofhashofhash', 'hashinsideahash' => [1, 'secondelementofarrayofsecondhash']}}; print "[$ascalar->{'a'}->{'hashinsideahash'}[0]]\n"; print "[$ascalar->{'a'}->{'hashinsideahash'}[1]]\n"; __END__ [1] [secondelementofarrayofsecondhash]

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://245989]
[james28909]: yep, i am scraping a websites date/time stamp from an article. none of that is relevant though because the strings i get are as expected. the returned data from the website is the list of @weekdays
[james28909]: i need to convert those @weekdays to an numerical date based off of scalar localtime
[james28909]: i have thught about this and though about it lol
[james28909]: also remember, that if 'Today' is may 1, then Yesterday is not may 31 lol
[james28909]: theoretically speaking ofcourse
[james28909]: so if you subtracting as you loop, be aware that you will eventually be subtracting into a past month, or year <.<
[james28909]: dontcha love it!

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2017-04-29 03:53 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (531 votes). Check out past polls.