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.
In reply to Re: Tricky Problem
by Aristotle
in thread Tricky Problem
by perl_krish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |