Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Off by one key... or yet another example of why strict and warnings are always a good idea (even for "one-liners")

by shmem (Chancellor)
on Jul 18, 2019 at 23:49 UTC ( #11102996=note: print w/replies, xml ) Need Help??


in reply to Off by one key... or yet another example of why strict and warnings are always a good idea (even for "one-liners")

Setting up an alias in your shell's rc file helps - for bash:

alias sperl='env PERL5OPT="-Mstrict -Mwarnings" perl'

You keep running your oneliners without strictures; but if something blows or feels fishy, you just interrupt and type

prompt$ s!!

to run your latest command under strict and warnings.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
  • Comment on Re: Off by one key... or yet another example of why strict and warnings are always a good idea (even for "one-liners")
  • Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2019-12-14 12:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?