#!/usr/local/bin/perl -w use strict; while (<>){ chomp; my @array = split; print "@array\n"; # or whatever has to be done }