my @data = (<DATA>); chomp @data; my $i = 0; while($i+2 <= $#data) { my @three = @data[$i..$i+2]; print "@three\n"; $i++; # Do stuff to process @three print $_,"\t" for ( @three ); print("\n\n"); }
In reply to Re: Grabbing lines three-by-three from a file
by joealba
in thread Grabbing lines three-by-three from a file
by belden
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |