Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

RE: Re: use strict

by KM (Priest)
on Jun 07, 2000 at 19:22 UTC ( [id://16876]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://16876]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 13:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found