Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^6: Perl logical operators

by roboticus (Chancellor)
on Jul 19, 2018 at 15:55 UTC ( [id://1218840]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Perl logical operators
in thread Perl logical operators

Nice! I really ought to review all the perl docs again and see what other interesting things I've missed.

I just gave it a try, and it seems to work well. I went ahead and updated my .bashrc file:

. . . export PERL5LIB="/mystuff/Perl/LIB" export PERL5OPT="-Mstrict -Mwarnings" alias p5="perl -Mstrict -Mwarnings" . . .

and now have the behavior I want. Pretty nice.

The PERL5OPT setting might interfere with some other scripts (I won't know until I run into one of them), so I created an alias to do essentially the same thing. (I wonder why I haven't thought of that earlier?) I'll remove the PERL5OPT setting if/when it causes me any grief. As Your Mother mentions earlier, it's often going to be a problem for one-liners. I rarely use one-liners, but I don't know how many are embedded into many of the tools I use.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^7: Perl logical operators
by Anonymous Monk on Jul 10, 2019 at 22:57 UTC
    Note that strict and warnings are lexical pragmas. It will only apply to the code or file you execute directly, not any included modules. This is a good thing; you don't want to have to fix bugs you introduced to code you didn't write. (This is also why -w and -W are the wrong approach.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-03-29 12:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found