Hm... I don't comment what you said, as I am not sure whether I actually have understood what you said as it meant to be. Any way, try those two pieces, and hope they mean something to you (no harm, food for thought :-):
use strict; use warnings; my $s = "1..11"; while (my $line = <DATA>) { print "line = $line"; print for (1..10 or $s); print "\n"; } __DATA__ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
And this:
use strict; use warnings; my $s = "1..11"; <DATA>; print for (1..10 or $s); print "\n"; <DATA>; print for (1..10 or $s); print "\n"; <DATA>; print for (1..10 or $s); print "\n"; <DATA>; print for (1..10 or $s); print "\n"; <DATA>; print for (1..10 or $s); print "\n"; <DATA>; print for (1..10 or $s); print "\n"; <DATA>; print for (1..10 or $s); print "\n"; <DATA>; print for (1..10 or $s); print "\n"; <DATA>; print for (1..10 or $s); print "\n"; <DATA>; print for (1..10 or $s); print "\n"; <DATA>; print for (1..10 or $s); print "\n"; <DATA>; print for (1..10 or $s); print "\n"; __DATA__ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
In reply to Re: Re: Re: Re: for loops and 'and'
by pg
in thread for loops and 'and'
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |