#!/usr/bin/perl

#the documentation in Apache::Request is pretty complete.  I've only tested
#Apache::Upload and don't use it in production (because I don't need to
#support uploads) but you can start your script like this:

use strict;
my $r = Apache::Request->new(shift);
my $upload = $r->upload;


#now you have an Apache::Upload object.  use the various methods on $upload
#as are in the docs.  for instance, the perldoc shows you how to get back a
#filehandle that you can use to read the file:

my $fh = $upload->fh;
my $lines = 0;
while(<$fh>) {
  ++$lines;

}
