in reply to Getting rid of uninitialized value warning (was: can't spot the error)

I think you shoud check your array before printing entries 13 and 14, I suspect they're indeed un initialized.
Try doing:
#! /usr/local/bin/perl -w use strict; open (FILEHANDLE, $ARGV[0]) or die "unable to open file"; open (OUTFILE, ">$$.output"); my @array; while (<FILEHANDLE>) { chomp; @array = (); @array = split(/\s+/); if (defined($array[13]) && defined($array[14])) { print STDOUT "$array[13]\t$array[14]\n"; print OUTFILE "$array[13]\t$array[14]\n"; }


Thanks.

Hotshot