Hi, this is part of my perl script:
my $C = getDistance ($common_node); print $C; sub getParent { my ($taxId) = @_; my @parent_list = ""; while ($taxId = $taxId1){ my $parent = `getz "[taxonomy:$taxId1]" -f pid`; chomp $parent; $parent =~ s/PARENT ID :/ /; $taxId1 = $parent; push @parent_list, $parent; # } return @parent_list; } sub getDistance { my ($common_node) = @_; my $id; my $count; do{ $id = getParent ($taxId); $count++; }until ($id eq $common_node); return $count; }
It seems OK but I don't know why it doesn't have any output. Any response would be appreciated.
In reply to perl question by semi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |