for completeness two other approaches:
use strict; use warnings; my @array= 1..10; do { print "@array\n" } while defined shift @array; @array= 1..10; for (1..@array) { print "@array\n"; shift @array; }
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
In reply to Re: whats wrong with this code? (alternatives)
by LanX
in thread whats wrong with this code?
by purnak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |