in reply to printing elements of an array on new lines
print "$_\n" for @array;
Cheers - L~R
Update: I love Perl
In a short span of time numerous solutions have been provided. For such a simple task as printing the elements of an array - lots of Perl has been used:
Let me add a couple more using $\ and map
{ local $\ = "\n"; print $_ for @array; } or print map {$_ .= "\n"} @array;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: printing elements of an array on new lines
by Not_a_Number (Prior) on Aug 23, 2003 at 18:07 UTC | |
by Limbic~Region (Chancellor) on Aug 23, 2003 at 19:57 UTC |