use strict, CGI, blah blah ... my $cgi = new CGI; my $filename = $cgi->param('uploaded_file'); my $file = $filename; # can't remember why I do this, always have $file =~ s!^.*(\\|\/)!!; # something about cleaning stuff up my $buffer; my $content_to_parse; while (my $bytesread = read($filename,$buffer,1024)) { $content_to_parse = $content_to_parse . $buffer; } # ok now file contents are in $content_to_parse # try splitting on ^M (windoze newlines) my @contentarray = split /\015$/, $content_to_parse; # doesn't work - @contentarray is empty # scratch head, get another diet coke # now do line by line parsing ... the end