|
||||||
| Perl Discussion for the PERL language - Practical Extraction and Reporting Language, is a programming language often used for creating CGI programs. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||||
|
Hello all.
I am new to PERL. I have question about this line: #!/usr/local/bin/perl Does all perl source files must be with that same line (path to compiler of perl)? What if path in other host is not the same as in others? I know that this line tells to run the file through Perl.
__________________
Free Web Templates like WebSpell, FrontPage and more. |
| Sponsored Links |
|
|
|
|||||
|
So I can write PERL scripts without these lines? And it will work?
__________________
Free Web Templates like WebSpell, FrontPage and more. |
|
|||||
|
If you do not include it you will not be able to execute the Perl script with "./scriptname.pl" and will have to call it as "perl scriptname.pl". It will also not work via the web executed from Apache/your webserver software.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog Don't hesitate to ask any questions that you have! Check out our ASCII Calculator! |
|
|||||
|
But what if I move script to other server where value of this first line
#!/usr/local/bin/perl will be other? I will must replace these lines by hand or what?
__________________
Free Web Templates like WebSpell, FrontPage and more. |
| Sponsored Links |
|
|
|
|||||
|
Yes. Or you could create a symbolic link in /usr/local/bin/ to the new location of Perl (only in Linux).
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog Don't hesitate to ask any questions that you have! Check out our ASCII Calculator! |
|
|||||
|
Big thanks Jordan. What is symbolic link? Its made by .htaccess:
Options FollowSymlinks or what?
__________________
Free Web Templates like WebSpell, FrontPage and more. |
|
|||||
|
It is done at the operating system with the command: "ln -s /path/to/link".
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog Don't hesitate to ask any questions that you have! Check out our ASCII Calculator! |
|
|||||
|
Ok, thanks Jordan for answers.
__________________
Free Web Templates like WebSpell, FrontPage and more. |
|
|||
|
Easier to just edit the shebang line than changing the server configuration, unless you are the server administrator that is.
Apache can also be setup to not use the shebang line, but again, this is a server configuration and you may not be able to edit the apache config file or restart the apache server. |
| Sponsored Links |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Microsoft to Release .NET Framework Source Code in v3.5 | Kernel | Programming News | 0 | 10-05-2007 07:45 AM |
| Making it Standalone from Source Code (Python) | annannienann | Delphi/Python | 8 | 10-02-2007 11:45 PM |
| HTML Basic Formatting | clookid | Tutorials, Classes and Code | 14 | 03-06-2007 03:10 PM |
| Valve: Half-Life 2 Source Code | falco85 | General Programming | 3 | 10-28-2006 05:03 PM |