in reply to Re: use strict
in thread use strict

To be more specific, -W tests to see if a file is writable by the real uid/gid. It would be used like:

if (-W $file) { ... do happy stuff ... }else{ ... do unhappy stuff ... }

Whereas -w is a switch used when running Perl to add a behaviour to the interpreter as it compiles and runs your code. You can see about the file test swicthes by typing:
perldoc -f -X

However, there is a -W switch for Perl 5.6 to turn on all warnings.

Cheers,
KM

Replies are listed 'Best First'.
RE: RE: Re: use strict
by lhoward (Vicar) on Jun 07, 2000 at 20:07 UTC
    -W used on the perl command line has a different meaning. perl -W enables all warnings. perl -w enables many useful warnings. At least in perl 5.6 it does....
      What version of Perl are you using? -W didn't appear until 5.6, so it isn't relevent to everyone.

      # perl -W -e0 Unrecognized switch: -W (-h will show valid options).

      Cheers,
      KM