User Tools

Site Tools



There are several ways to execute a perl script. Let's assume that we have the script named In any time, we can execute that script by calling the perl interpreter:


But, we may sometimes want to execute that script without the interpreter. To be able to execute it through our shell, we must first make sure that the scripts starts with the following line:


That, of course, tells where the perl interpreter is located. It may vary from system to system.

Next, we must be sure that the script has executable (+x) permissions. If it does not have, then we can make it executable:

chmod +x

And, at last, we can execute it:

handbook/handbook/perl2.txt · Last modified: 2010/04/15 21:18 (external edit)