The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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




Thread: Perl Question
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 09-28-2006
thestevew thestevew is offline
Registered User
  
 

Join Date: Mar 2006
Location: South Yorkshire, UK
Posts: 114
Perl is a scripting language run by the interpreter program - conveniently called 'perl'. So what you were doing was using your shell to run the perl interpreter and tell it which script to run. Alternatively, you can tell the shell which interpreter to use by putting the interpreter name inside the script. Do this by
having a line similar to
Code:
#!/usr/bin/perl
as the first line of your script - replace /usr/bin/perl with the path to your perl interpreter if your system is different.

hope this helps