Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 Fletch (Chancellor)
on Jul 18, 2019 at 12:43 UTC ( #11102970=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")

Coincidentally there was a p5p thread just this morning about an additional option to do just this (strict + warnings for oneliners; the original suggestion was a unicode -ǝ or -Ǝ).

https://www.nntp.perl.org/group/perl.perl5.porters/2019/07/msg255600.html

The cake is a lie.
The cake is a lie.
The cake is a lie.

  • 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")

Replies are listed 'Best First'.
Re^2: Off by one key... or yet another example of why strict and warnings are always a good idea (even for "one-liners")
by hippo (Chancellor) on Jul 18, 2019 at 15:44 UTC
    the original suggestion was a unicode -ǝ or -Ǝ

    That was a joke, right? I don't know about you but there's no way that I'm going to be able to find the codepoint for that symbol and then work out the right combination of keys to press to generate it for any given combination of keyboard+shell+term+OS in a shorter space of time than it takes to type -Mstrict -w

      Quite (I had to cheat and use the OS X Symbol menu to get them when I typed them above and it still took a minute to scroll to the E's). I think later in the thread saner (or perhaps, less facetious) heads were prevailing and going over free ASCII option characters and maybe -[Zz] being available.

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.

Re^2: Off by one key... or yet another example of why strict and warnings are always a good idea (even for "one-liners")
by afoken (Canon) on Jul 18, 2019 at 18:47 UTC
    the original suggestion was a unicode -ǝ or -Ǝ

    Bad idea. There are still many ASCII letters left in perlrun. perl isn't ls. And most people, including me, don't know from memory how to enter -ǝ or -Ǝ. Using perl should be easy, not hard. How about using the unused "-r" (as in run), making perl -r 'say "hi"' the shorter equivalent of perl -Mstrict -w -E 'say "hi"'?

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re^2: Off by one key... or yet another example of why strict and warnings are always a good idea (even for "one-liners") oneliners needing strict shouldnt be oneliners, dont mess with perlrun
by Anonymous Monk on Jul 19, 2019 at 03:06 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2019-12-06 05:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (154 votes). Check out past polls.

    Notices?