in reply to Data from a Hash/Array

It looks like the data returned is in JSON/YAML format. Please review documentation for the Tesco::API to find out the return type.

Please search cpan.org for a module suitable to interpret the the return type.
That will allow you to reference the variable desired easily.

If this is a test situation, you can use a regex like:

my ($prodid) = $code=~/"ProductId": "([^"]+)"/;

             I hope life isn't a big joke, because I don't get it.
                   -SNL

Replies are listed 'Best First'.
Re^2: Data from a Hash/Array
by toolic (Bishop) on Sep 05, 2012 at 20:01 UTC
    It looks like the data returned is in JSON/YAML format.
    I think you're onto something. The WebService::Tesco::API POD does not say, but looking through the source code, product_search eventually calls get...
    sub get { ... return JSON->new->utf8->decode($res);