![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Perl question regarding [ ] | hankooknara | Shell Programming and Scripting | 2 | 07-01-2007 04:21 PM |
| perl question | BG_JrAdmin | Shell Programming and Scripting | 1 | 09-09-2005 07:46 PM |
| Perl Question | Gary Dunn | Shell Programming and Scripting | 2 | 12-03-2004 12:37 PM |
| PERL question | frank | Shell Programming and Scripting | 1 | 06-18-2002 03:13 AM |
| Perl question | Jubba | Shell Programming and Scripting | 1 | 04-01-2002 02:24 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Perl Question
Hi everyone
I am not even a novice at Perl scripting .. but had to edit one the other day. The only way I can get it to run is by prefixing 'perl' before running it - ie # perl scriptname I am running AIX. Any ideas why i have to do that ? Thanks! |
|
||||
|
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 hope this helps |
|
||||
|
... and don't forget to chmod the script with executable permission.
|
| Sponsored Links | ||
|
|