in reply to For Loops and Reversing output
brusimm,
So you want to reverse without using reverse:
So you want to reverse without using reverse:
Oh, you really want to go forwards but have the output appear backwards?my $idx = $#array; while ($idx--) { print "$array[$idx]\n"; }
my $output = ''; for my $elem (@array) { $output = "$elem\n" . $output; } $output .= "\n"; print $output;
Cheers - L~R
|
---|
In Section
Seekers of Perl Wisdom