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 -->
  #3 (permalink)  
Old 05-20-2008
jisha jisha is offline
Registered User
  
 

Join Date: Jan 2008
Location: Bangalore,India
Posts: 144
Thanks Era .
Actually i got the code from the internet and didn't bother to find how it works (silly of me)..
I just want to store the number of lines in a file in the variable.

I use to do the following inside a shell script (say 1.sh)
wc -l "sample_file_name" > 1.txt
no
no_lof_line=`cut -d" " -f1 1.txt`

I need to use the same funda here "inside" a perl script ( say test.pl)
I still doubt whether the code i said in the first thread still works inside a perl script.