in reply to Count number of lines?

Well, I'm not exactly one to ask about Perl and CGI (as I haven't done very much of it), but if you've got Perl down reasonably well, I'd suggest looking at "CGI Programming with Perl" from O'Reilly. It helped me out a good deal with the little I've done. If you're still working with Perl, I'd recommend getting that down first -- in which case, there's always the Camel (and/or Llama) book.

And about your number of lines question:

sub numlines { my $file = shift @_; unless (open FILE, "$file") { warn "Could not open $file: $!\n"; return -1; # Only a recommendation } my @lines = <FILE>; close FILE; return scalar @lines; }

I don't know if there's a way to determine the number of lines in a file without reading the entire thing... you might also want to look up perlvar and check out $., as that likely has the "cooler" way to accomplish that task. Hope that helps!

His Royal Cheeziness