Re: Question on subroutines

2004-11-30 Thread John W. Krahn
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

Re: Question on subroutines

2004-11-30 Thread Lawrence Statton
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 "

Re: Question on subroutines

2004-11-30 Thread Jonathan Paton
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:

Question on subroutines

2004-11-30 Thread Dave Kettmann
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: