Hi;
I have the following output from Data::Dumper and I want to extract
the first string that the "Id" name points to.
$VAR1 = [
bless( {
'Id' => [
'01tC0000003udXAIAY',
'01tC0000003udXAIAY'
],
'type' => 'Product2'
}, 'sObject' )
];
So if the data structure is contained in a Perl variable called
$data, then I think that this is a reference to a hash.
So I need to do something like "@{$data}" to get to the hash.
But I want the "Id" element of the hash so I want something like
@{$data}->{'Id'}
But that's the array, so what about ${@{$data}->{'Id'}}[0]
But that isn't right either.
I'm either getting an undefined reference to a hash error or not a
scalar reference error.
Thanks,
Ken Wolcott
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/