akagrawal3 has asked for the wisdom of the Perl Monks concerning the following question:
Now for all the value in the array ref serviceId, I would like to call a function getServiceType which takes serviceId as the argument. This function again returns a hash ref, say, when I pass serviceId=3 as argument, I get a hash ref which contains the following data$result<code>which has the following data <code> $VAR1 = { 'serviceIdList' => { 'serviceId' => [ '3', '4' ] } }; <code> Now how i got that is by executing this statement <code>print Dumper $result;
Now, the code should be able to check if serviceType is equal to 9, then it should immediately exit, else it should continue for all the elements in the array ref. In case, my scenario is not clear, please let me know. Your help is highly appreciated. Thanks and regards$VAR1 = { 'serviceType' => '9', 'maxNrOfRules' => '0', 'defaultRule' => '0' };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: dereferencing array ref in a hash ref
by grizzley (Chaplain) on Jul 17, 2012 at 06:49 UTC | |
by akagrawal3 (Beadle) on Jul 17, 2012 at 10:07 UTC | |
by akagrawal3 (Beadle) on Jul 17, 2012 at 08:36 UTC | |
|
Re: dereferencing array ref in a hash ref
by Gangabass (Vicar) on Jul 17, 2012 at 07:18 UTC | |
by akagrawal3 (Beadle) on Jul 17, 2012 at 08:34 UTC |