#!/usr/bin/perl -w use strict; use warnings; my @three; # Stoke it chomp ($three[0] = ); chomp ($three[1] = ); while(!eof(DATA)) { chomp ($three[2] = ); # Do stuff to process @three print join ("\t", @three), "\n"; # Rotate shift(@three); } __DATA__ 1 2 3 4 5 6