Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Using perl's runtime options with -Mstrict

by deprecated (Priest)
on Jan 27, 2001 at 03:16 UTC ( #54671=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
           -s   enables rudimentary switch parsing for switches on
                the command line after the program name but before
    ...
    
                    #!/usr/bin/perl -s
                    if ($xyz) { print "$xyz\n" }
    
  2. or download this
    #!/usr/bin/perl -ws
    # minus-ess.pl
    ...
    my $switch = "hooray" unless (defined $switch);
    
    print $switch;
    
  3. or download this
    Global symbol "$switch" requires explicit package name at minus-ess.pl
    + line 7.
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2021-10-19 06:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (76 votes). Check out past polls.

    Notices?