Dave Kettmann wrote:
All,
Hello,
First off, I have looked thru Learning Perl (3rd edition) and Perl in
a Nutshell, but I did not find the answer to my question.
The best place to look for answers is the documentation that is supplied with
Perl itself. A complete description of Perl's subroutines
On Tue, 30 Nov 2004 23:33:39 +, Jonathan Paton <[EMAIL PROTECTED]> wrote:
> Dave,
>
> Yes, look up references in your books.
>
> E.g.
>
> sub example {
> my @data = qw;
> return [EMAIL PROTECTED];
> }
>
> my $reference = example();
>
> for my $word (@{ $reference }) {
> print "
Dave,
Yes, look up references in your books.
E.g.
sub example {
my @data = qw;
return [EMAIL PROTECTED];
}
my $reference = example();
for my $word (@{ $reference }) {
print "$word\n";
}
Jonathan Paton
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
All,
First off, I have looked thru Learning Perl (3rd edition) and Perl in a
Nutshell, but I did not find the answer to my question. I know you can
'substitute' a subroutine name for a variable to get the result of the
subroutine. My question is, can a subroutine return an array? such as this: