Re: NEw to Perl
From: Tad McClellan (tadmc_at_augustmail.com)
Date: 09/03/04
- Next message: Tad McClellan: "Re: Simple question"
- Previous message: CBFalconer: "Re: Xah Lee's Unixism"
- Maybe in reply to: Charlton Wilbur: "Re: NEw to Perl"
- Next in thread: Ben Morrow: "Re: NEw to Perl"
- Reply: Ben Morrow: "Re: NEw to Perl"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 2 Sep 2004 23:52:05 -0500
Shawn Melnic <sham_x30@yahoo.com> wrote:
> while(&list) {
> @line = ..
> bla bla
> bla
> }
>
> sub list {
my @list;
push @list, "line 1";
push @list, "line 2" ;
push @list, "line 3" ;
return @list;
> }
>
> Basically, I want while to read the sub list into an array..
Can't be done.
But you can have the sub return a list, as above.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
- Next message: Tad McClellan: "Re: Simple question"
- Previous message: CBFalconer: "Re: Xah Lee's Unixism"
- Maybe in reply to: Charlton Wilbur: "Re: NEw to Perl"
- Next in thread: Ben Morrow: "Re: NEw to Perl"
- Reply: Ben Morrow: "Re: NEw to Perl"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|