Hi Sunita,

>            Perl script  works without the first line ( perl Interpreter
> : #! /usr/bin/perl) . What is the real use of this line ? This line does
> not through any error on Windows where , this path does not exist .

It is a shebang line which is only useful in Unix-like operating
systems. In such systems, the shebang line should start in the first
column of the first line. When such a script with its executable bit
set is run by itself, the operating systems checks for the shebang
line to see which interpreter should be used for executing the script.

However, in Windows (and other non-Unix-like operating systems), the
shebang is usually considered a comment and skipped. Instead of the
shebang line, such systems depend on file extension associations or
explicit invocation of the script using the interpreter.

For more details, see: http://en.wikipedia.org/wiki/Shebang_(Unix)

Regards,
Alan Haggai Alavi.
-- 
The difference makes the difference

--
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