more useful options | |
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 LanX (Saint) |
on Jul 18, 2019 at 00:53 UTC ( [id://11102961]=note: print w/replies, xml ) | Need Help?? |
Good story, we've all been thru this once. =) Just a hint > (And yes, I do use the the duo on most every script I write-just not always on "one-liners".) well you could set up an alias psw=perl -Mstrict -Mwarnings if you think that you'd really go to declare variables. IIRC there was also a possibility to globally require a a piece of Perl code whenever your installation runs.
update> where "-Mstrict -Mwarnings" would have added a mere 19 characters in length or see perlrun#PERL5OPT: "Switches in this variable are treated as if they were on every Perl command line."
though you might prefer to avoid strict vars in one-liners
comming back to your original case
Cheers Rolf
In Section
Meditations
|
|