in reply to Re^6: Align given substring(s) in lines
in thread Align given substring(s) in lines

If you've done a lot of things in awk before coming to Perl, you'll appreciate why it can be useful not to use strict.

I admit I haven't, but if you mean oneliners, then yes, those are usually written without strict and warnings and it leads to more concise code with its own kind of beauty. At least in my mind, omitting strict and warnings in oneliners is usually acceptable because they are so short that proofreading and testing them is a relatively simple task.

(OTOH, roughly 95% of the oneliners I post here I actually develop with -wMstrict turned on, only to then remove the switches once I'm satisfied the code works, so it gets shorter and fits on one line. An artifact of this that some might notice is my abuse of $a and $b due to them being exempt from the checks...)

Replies are listed 'Best First'.
Re^8: Align given substring(s) in lines
by johnaj (Sexton) on Apr 29, 2021 at 15:03 UTC
    I meant both one-liners and larger scripts; I find that awk can be used with great success in both ways. Here is a simple markup language implemented in awk, for example. It does approach the border of what is reasonable (and maintainable) awk code, though.
    An artifact of this that some might notice is my abuse of $a and $b due to them being exempt from the checks...

    Clever!