Ok the highlights do not seem to have made it, I marked the line that is getting the error message. Thanks
#this is the subroutine to search the file sub search{ open(FILE, '<fai.txt') || die $!; <-- Also, is this statment correct to open a file for read only? while (<FILE>) { chomp; # remove newline my @fields = split(/\|/, $_); # test whether the search string matches part number if ($fields[0] =~ /$PartNumber/ ) { print "$PartNumber Rev. $Revision has a First Article Report\nWould you like to view it?"; } }} my $answer = <STDIN>; chomp($answer); # If the answer is yes then fill the form with the information if ($answer eq "yes") { print "\n\n\none second please......\n"; print "retrieving file........\n"; print "$fields[0]: $fields[1]: $fields[2]: $fields[3]\n";<--This is the line that gets the error message } # If the answer is no then die else { print "ok, well have a nice day.\n"; } close(FILE); Kerry LeBlanc Materials Auditor Process Owner 75 Perseverence Way Hyannis, MA. 02601 1-508-862-3082 http://www.vsf.cape.com/~bismark <http://www.vsf.cape.com/~bismark>