Re: very starting help

2011-07-18 Thread Alan Haggai Alavi
Hello Anant,

#!/usr/bin/perl is a *shebang* and is useful only in unix-like systems where 
it refers to the location of the interpreter. Under other systems the 
interpreter ignores this line as a comment. Shebang lines are useful to 
execute a script directly without having to specify the interpreter.

Consider a script named main.pl which can be executed under unix-like systems 
as:

perl main.pl

or

./main.pl  # system checks the shebang line for the interpreter to use

For more information: 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/




Re: very starting help

2011-07-18 Thread Christian Walde

On Mon, 18 Jul 2011 07:34:14 +0200, anant mittal perl.an...@gmail.com wrote:


-w


Just a quick note: Please do not use -w in the hashbang, it forces warnings everywhere, 
even when modules didn't want warnings. You'll get weird error messages if you leave that 
in. Instead just write use warnings; at the top of your code and you'll be 
fine. :)

--
With regards,
Christian Walde

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




Re: very starting help

2011-07-18 Thread Christian Walde

On Mon, 18 Jul 2011 10:19:00 +0200, Chankey Pathak chankey...@gmail.com wrote:


@Christian wale: Why not to use -w for using warning everywhere?

It's good to use warnings everywhere for a good program, isn't it?


Simply put:

It activates warnings for code you did not write.

It is an extremely good idea to enable warnings for all code you write 
yourself. However if you enable it for code written by authors who did not want 
warnings, or for old modules, then you will get pointless messages you cannot 
fix.

--
With regards,
Christian Walde

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