And I repeat, it doesn't. Windows looks up the association you defined
and then goes through the %PATH% in your environment looking for the
first perl.exe it can find. It doesn't even read the file, but passes it
as a parameter to perl.exe. At that point, it is up to the Perl
interpreter to decide what to do with that first line.

Bob McConnell

-----Original Message-----
From: Shawn H Corey [mailto:shawnhco...@gmail.com] 
Sent: Monday, January 10, 2011 11:08 AM
To: beginners@perl.org
Subject: Re: 1st line of perl script

On 11-01-10 10:57 AM, Sunita Rani Pradhan wrote:
> Yes I agree . Then I am coming back to my 1st question . This path
does not exist on windows "/usr/bin/perl " , how it works ?

It doesn't.  At least, it doesn't if you start the script from Windows. 
  What Windows does is look up the extension, *.pl, in the Registry and 
launch the program associated with it.  When it starts, perl will check 
the first line for any switches (options in UNIX talk) and sets them.

However, some web servers read the the shebang line and executes what it

says.  So, you should change any Perl CGIs to point to the perl program.


-- 
Just my 0.00000002 million dollars worth,
   Shawn

Confusion is the first step of understanding.

Programming is as much about organization and communication
as it is about coding.

The secret to great software:  Fail early & often.

Eliminate software piracy:  use only FLOSS.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to