CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
The Famous First Words



Oct 7, 2001, 10:27 PM

Post #1 of 2 (635 views)
The Famous First Words Can't Post

Okei guys, you are free to treat me as a perfect newbie in this stuff so don't expect any intellectual comments. I wanted to ask about the famous first line that exists in every Perl/CGI script.

-> #!usr/perl/perl

I've seen different versions of this:

-> #usr/perl/perl
-> #!usr/perl/perl.exe

Which one is correct? Do I need to specify the .exe can I write it with the drive name?

-> #!C:\Perl\perl

Help me out here...

The Lord of Illusions

Administrator / Moderator

Oct 8, 2001, 7:03 AM

Post #2 of 2 (630 views)
Re: The Famous First Words [In reply to] Can't Post

That's commonly called the "shebang" line. It identifies the path to perl on your server. As for which is correct on your server, the best way to know for sure is to ask your server administrator. One of the most common paths is #!/usr/bin/perl

If you happen to be on a Win32 machine with Perl installed, you can use the full path (including drive letter).

On my home machine (Win98), I have perl installed at g:/usr/bin/perl.exe but have added G:/usr/bin to my autoexec.bat path list. My file associations also point pl scripts to perl, so I use only #!/usr/bin/perl, not #!g:/usr.bin/perl.exe, though both would work.


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives