in reply to Tricky Problem
The trickiest part about your problem is that we don't know what it is. Can you tell us what "read" means in your case?
As far as the count of lines is concerned, there is any number of ways. If you slurp the file to an array, you can just look at how many elements the array has. If you read it in a while loop, you could look at the $. special variable afterwards. Or you could count newline characters using tr///. What is easiest and/or most efficient depends on the context in which you're doing it.
Makeshifts last the longest.
|
---|
Replies are listed 'Best First'. | |
---|---|
A reply falls below the community's threshold of quality. You may see it by logging in. |