The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-20-2008
jisha jisha is offline
Registered User
  
 

Join Date: Jan 2008
Location: Bangalore,India
Posts: 144
Arrow Number of lines in a file (perl script)

Hi All,

The below command gives the number of lines in a file

perl -le 'print $==()=<>' <file_name>

I want to use this command inside a perl script and store the
output in a variable. How can i do this ?

Is their any other methods to adopt this?

Thanks in advance
JS