from the cookbook:
$count += tr/\n/\n/ while sysread(FILE, $_, 2 ** 16);

> -----Original Message-----
> From: Shishir K. Singh [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 11:47 AM
> To: [EMAIL PROTECTED]
> Subject: No of lines in a file
> 
> 
> Hi, 
> 
> Is there a way to get the number of lines in a file. Conditions:
> 
> a) Without using backticks on wc -l
> b) Without opening the file and looping over the records
> 
> Thanks
> Shishir 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to