Hi All,
I've essentially just started using perl and my first task is to access sales force and extract the database contents. So far, I've been successful getting a list of objects from the salesforce database, but any variation of "print" I use does not yeild the results I'm looking for. The following is an example of the closest I can get:
#!/usr/bin/perl -w
use use DBI;
use warnings;
use strict;
# Authenticate with the Salesforce API based on command line parameters.
my $sforce = 'username' => $ARGV[0],
'password' => $ARGV[1]
);
my $query = 'Select a.NAME, a.Type, a.Lead from MY_NEW_DB a';
my $result = $sforce->do_query( $query );
foreach my $field (@{ $result } ) {
print $field->{'NAME'} . {'Type'} . {'Lead'} . "\n";
}
Here is what the output is:
Odd number of elements in anonymous hash at ./connect line 27.
Odd number of elements in anonymous hash at ./connect line 27.
BobBuilderConstructionHASH(0xb3d4ff8)HASH(0xa792710)
Please help.
Thanks....
I've essentially just started using perl and my first task is to access sales force and extract the database contents. So far, I've been successful getting a list of objects from the salesforce database, but any variation of "print" I use does not yeild the results I'm looking for. The following is an example of the closest I can get:
#!/usr/bin/perl -w
use use DBI;
use warnings;
use strict;
# Authenticate with the Salesforce API based on command line parameters.
my $sforce = 'username' => $ARGV[0],
'password' => $ARGV[1]
);
my $query = 'Select a.NAME, a.Type, a.Lead from MY_NEW_DB a';
my $result = $sforce->do_query( $query );
foreach my $field (@{ $result } ) {
print $field->{'NAME'} . {'Type'} . {'Lead'} . "\n";
}
Here is what the output is:
Odd number of elements in anonymous hash at ./connect line 27.
Odd number of elements in anonymous hash at ./connect line 27.
BobBuilderConstructionHASH(0xb3d4ff8)HASH(0xa792710)
Please help.
Thanks....