----- Original Message ----- From: "E.Horn" <[EMAIL PROTECTED]> Date: Monday, January 3, 2005 4:51 am Subject: reference
> Hello! > I have a problem to get the contents of a variable! > How can i reference the contents of the $id variable? > sub get_s($da,$id) > { > my $url='http:...db='; > my $da=$_[0]; > my $id=$_[1]; > my $p_id='&id='; > my $m='&ret=xml'; > return $url.$da.$par_id.$id.$m; > > } sub get_s() { my ($da,$id) = shift; # remember this is Perl my $url='http:...db='; my $p_id='&id='; my $m='&ret=xml'; return $url.$da.$par_id.$id.$m; } > sub pro() > { > my $xmldoc = $_[0]; > my $parser = new XML::DOM::Parser; > my $doc = $parser->parse($xmldoc); > my $nodes = $doc->getElementsBy(""); > > for (my $i=0; $i<$nodes->getLength(); $i++) > > {my $node = $nodes->item($i); > my $accessions=$node->getElementsBy(""); > my $id=processNode($accessions->item($i)); > my $url=& get_s("nucle",(how do i get the contents of $id at this > position?); > > my $doc_s=get $url; > } > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>