use JSON::XS; use WWW::Mechanize; use HTTP::Cookies; use LWP::Simple;; use strict; use warnings; sub parse { my $code = get("http://steamcommunity.com/market/listings/440/" . $crates{$_[0]} . "/render/?count=1&start=0&query="); my %json = decode_json $code; print %json{success}; }