Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Why isn't C<use strict> the default?

by etcshadow (Priest)
on Oct 28, 2004 at 04:04 UTC ( #403248=note: print w/replies, xml ) Need Help??


in reply to Why isn't C<use strict> the default?

perl -lne 'END{print$x}$x+=$_'

Perl one liners are nice. Don't forget that, although perl is also an awesome fully-featured programming language, it's roots are as a command-line data-processing tool (ala sed, awk and even grep). Who wants to spend those extra characters in a -e?

Don't get me wrong, I like strict in anything more than a few lines long, but I also write a lot of stuff that's less than a few lines long.

------------ :Wq Not an editor command: Wq

Replies are listed 'Best First'.
Re^2: Why isn't C<use strict> the default?
by demerphq (Chancellor) on Oct 28, 2004 at 08:30 UTC

    This argument doesn't addresss the fact that one could arrange it so perl would turn on strict and warnings for code from any other source than -e but leave -e code unencumbered.


    ---
    demerphq

      First they ignore you, then they laugh at you, then they fight you, then you win.
      -- Gandhi

      Flux8


      Or you could have another name for the binary that makes perl assume use strict; (and maybe warnings also)…

      #!/usr/bin/perls no swine;

      Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2019-10-20 09:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?