#! /usr/local/bin/perl -w use strict; open (FILEHANDLE, ") { $line = $_; chomp ($line); @array = (); @array = split (/\s+/, $line); # error messages say that something is uninitialised in the below line! print STDOUT "$array[13]\t$array[14]\n"; } open (OUTFILE, ">$$.output"); print OUTFILE "$array[13]\t$array[14]\n"; close OUTFILE; exit;