Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 (Bishop)
on Jul 18, 2019 at 12:43 UTC ( [id://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 (Bishop) 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 (Chancellor) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11102970]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 17:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found