in reply to subroutine list return
If you really wanted to get the count of items in the array returned, you could do it thus:
The trick with the "@{[]}" is described in perfunc, under the function "scalar".sub x{return qw/e f g h 31/}; $a= @{[x()]}; # Force array context when calling sub print $a This prints the value 5
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: subroutine list return
by chromatic (Archbishop) on Jun 25, 2003 at 01:25 UTC |