I am new with Perl. I'm following a bioinformatics webapi and I'm attempting to simply display the value stored in $result. My print "$result\n"; command doesn't appear to be functioning. What are some possibilities as to what is going on here?
# #!/usr/local/bin/perl
use strict;
# 1. include SOAP Lite
use SOAP::Lite;
# 2. specifies WSDL file
my $service = SOAP::Lite -> service('http://xml.nig.ac.jp/wsdl/GetEntry.wsdl');
# 3. call SOAP service
my $result = $service->getXML_DDBJEntry("AB000003");
开发者_运维知识库print "$result\n";
As I recall, $result
is an object; Try:
use Data::Dumper;
print Dumper($result), "\n";
This may help you determine what is going on.
Open the URL from your code in a browser and try a find "AB000003" via the browser search function.
For me I can not find the text - thus empty/undef is the logical result.
精彩评论