Hi I am a new user in perl. My question is just how can change local array to global array in order to use in main program? for exapmle this is just part of my script:
my @species = split "//", $list; foreach my $species(@species) { my @tree = edit($species); print @tree; } sub edit { my ($species) = @_; if($species =~ /RANK *: subspecies/ && $species =~ /PARENT ID * : +(\d+)/) { my $pid = $1; # # print "$pid\n"; return `getz "[taxonomy:$pid]" -e`; } }
how can use @tree in main program? Thanks in advance tom
In reply to local and global variable? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |