2
나는 XML :: DOM을 사용하여 Perl 코드를 작성 중이다.perl에서의 반환 값 XML :: DOM
다음과 같이 Perl 도움말 (XML :: DOM :: Node)에서 발견되었습니다.
@list = $node->getChildNodes; # returns a perl list
$nodelist = $node->getChildNodes; # returns a NodeList (object reference)
for my $kid ($node->getChildNodes) # iterate over the children of $node
아래와 같이 입력하면됩니다.
&myfunction($node->getChildNodes)
목록에 대한 참조가 표시되지 않습니다.
아래와 같이 임시 스칼라 변수를 선언하지 않고 참조를 얻을 수있는 방법이 있습니까?
my $tmp=$node->getChildNodes;
&myfunction($tmp)
고맙습니다.
그것은 작동합니다 !!! 고맙습니다. – NewToUnix
질문에 대한 답변이 있으면 옆에있는 표시를 확인하십시오. StackOverflow에 오신 것을 환영합니다! – ikegami