Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^3: WWW::Wordnik::API output

by greengaroo (Hermit)
on Nov 20, 2012 at 19:43 UTC ( #1004782=note: print w/replies, xml ) Need Help??

in reply to Re^2: WWW::Wordnik::API output
in thread WWW::Wordnik::API output

I suggest you use strict; because you would have received an error instead of nothing.


foreach (sort keys %hashref) { print "$_ : $hashref{$_}\n"; }

Should be replace by this:

foreach (sort keys %{$hashref}) { print "$_ : ", $hashref->{$_}, "\n"; }

I was using a HashRef not a Hash, $hashref is not the same variable as %hashref, so if you loop through %hashref, of course you get nothing because it is an empty variable. Using strict would have prevent you from doing this. I hope this helps!

Testing never proves the absence of faults, it only shows their presence.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004782]
[SuicideJunkie]: So, possibly interesting thing; I had that script which was using more than all the ram to open an absurdly large spreadsheet. I set it up to spin overnight nightly, so it stopped releasing memory since it was never fully exited.
[SuicideJunkie]: Didn't expect that to be a problem. There's plenty of disk space for swap, and the memory space would be reused the next day. But apparently virtualbox dies with a guru meditation when there's no physical memory unused on start.

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (1)
As of 2017-04-26 22:48 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (491 votes). Check out past polls.