Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11102996]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-25 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found