http://qs1969.pair.com?node_id=1009943


in reply to Re: Send JSON data to Perl scalar
in thread Send JSON data to Perl scalar

This is great! My only issue here is speed, since this is going to be run about once every minute or two.

--perl.j

Replies are listed 'Best First'.
Re^3: Send JSON data to Perl scalar
by tobyink (Canon) on Dec 22, 2012 at 09:42 UTC

    I don't see why that would be a problem. That script takes about 1.2 seconds to execute on my laptop (and this machine is pretty old and underpowered), so could comfortably execute 30 or 40 times per minute.

    Though probably if I wanted to retrieve this data more than once a minute, I'd probably just add a loop to the script so that you execute it once and it runs in the background, repeatedly retrieving the data.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'