From: "Philip Morley" <[EMAIL PROTECTED]>
> Also, as an additional point, in the extract of the script you
> provided, what is the point of this line:
> 
> #!/usr/bin/perl -w
> 
> if you are using a Windows Operating System, not a Unix/Linux one?

1) the fact that the default shell (cmd.exe) or the explorer (in case 
of doubleclick) ignores the shebang line doesn't mean all programs 
do. It may be used by some Unixie shell he uses or by the 
Windows version of Apache.

2) Perl itself does care about that line. And exits if it finds 
something that doesn't match /perl/i. Try to run this script with 
Perl.exe:

        #!/bin/sh
        print "Hello world\n";

3) Perl processes that line and uses whatever options you 
specified on the line. This means that

        c:\> perl
        #!perl -w
        print "x=$x\n";
        ^Z

and

        c:\> perl -w
        print "x=$x\n";
        ^Z

wil give you the same warnings.

This means that if you start your script with 
        #!perl -w
it will be run with warnings turned on even if the user doesn't ask for 
it ;-)

Jenda

=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain
I can't find it.
                                        --- me
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to