Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Re: Is there a shorter, more elegant way to write this deep hash lookup statement

Reply
Thread Tools

Re: Is there a shorter, more elegant way to write this deep hash lookup statement

 
 
George Mpouras
Guest
Posts: n/a
 
      02-17-2013
use strict;
use warnings;

my $ebay_record = {};
my $is_freight = 1;

$ebay_record->{ShippingDetails}->{ShippingServiceOptions}->{ShippingService22}
= 1;


if (( exists
$ebay_record->{ShippingDetails}->{ShippingServiceOptions}->{ShippingService}
) && (
$ebay_record->{ShippingDetails}->{ShippingServiceOptions}->{ShippingService}
== $is_freight ))
{
print "ok\n";
}

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Is there a shorter, more elegant way to write this deep hashlookup statement Dr.Ruud Perl Misc 1 02-21-2013 04:37 PM
Re: Is there a shorter, more elegant way to write this deep hash lookup statement Ted Zlatanov Perl Misc 0 02-21-2013 04:35 PM
Re: Is there a shorter, more elegant way to write this deep hashlookup statement C.DeRykus Perl Misc 0 02-19-2013 07:40 PM
What's a good way to find whether a hash is a subset of another hash (deep)? dblock Ruby 2 10-09-2011 08:37 PM
Is there a more elegant way to do this? Kamilche Python 7 06-29-2004 04:33 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57