in reply to Re^4: Add blank line between two consecutive lines starting with specified strings
in thread Add blank line between two consecutive lines starting with specified strings
My advice is not be overly concerned about "one liners", especially if you are new to Perl. Some folks think that there is some huge execution efficiency by a "one liner". I believe that assumption to be false. You still have to fire up Perl itself and there is significant overhead with that. The extra overhead of reading some few lines from a .pl file makes no significant difference. Having an actual program file allows me to put some comments in there: who wrote it, when, what it does, what version of Perl it was tested on, perhaps a revision history... Many one liners can get pretty cryptic and that's a bad thing if you expect non-Perl'ers to use it. Writing tricky one liners is an art form unto itself. I am very skeptical that a beginner should start with that. Enjoy your Perl adventure!