in reply to Re: works on command line, but not from perl
in thread works on command line, but not from perl

Then read each line in the file, incrementing a counter for each line you read

Perl already does that for you:

1 while <$INPUTFILE>; my $line_count = $.;

Replies are listed 'Best First'.
Re^3: works on command line, but not from perl
by roboticus (Chancellor) on Feb 12, 2010 at 12:03 UTC

    jwkrahn:

    Yeah, I was aware of that. I just didn't want to introduce him to too much magic at once. My response was already long enough. ;^)

    ...roboticus