strfry() has asked for the wisdom of the Perl Monks concerning the following question:
sub scroll { my ($i) = @_; my @x = for (my $x=0;$x!=(length($i)+1);$x++){ substr($i,$x,1), "\n"; +}; return @x; }
it works.sub scroll { my ($i) = @_ for (my $x=0;$x!=(length($i)+1);$x++){ print substr($i,$x,1), "\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: returning data from a for() loop?
by bikeNomad (Priest) on Jun 08, 2001 at 23:19 UTC | |
|
Re: returning data from a for() loop?
by srawls (Friar) on Jun 08, 2001 at 23:14 UTC | |
by strfry() (Monk) on Jun 08, 2001 at 23:26 UTC | |
|
Re: returning data from a for() loop?
by Sifmole (Chaplain) on Jun 08, 2001 at 23:13 UTC | |
by strfry() (Monk) on Jun 08, 2001 at 23:22 UTC | |
by Sifmole (Chaplain) on Jun 08, 2001 at 23:24 UTC | |
by strfry() (Monk) on Jun 08, 2001 at 23:33 UTC |