in reply to Re: beginners trap: one liner
in thread solved: beginners trap: one liner

I very seldom use one liners. I don't know what Notepad2 is, but it probably offers the same kind of functions as my ancient Textpad 4. I use Textpad 4 for C and Perl development.

I have a single F key to: save all open .pl and .pm files, compile current window, run it, capture stdout/error. I am not doing concurrent Unix and Windows development at the moment, but there are different ADDED: "command line" quoting rules that sometimes "hurt my brain".

If I am testing something to determine the behaviour of Perl, I seldom do one test case. Usually one test will be followed by others. Instead of multiple one liners, I put those tests in a single .pl file and document the output after an __END__ tag or other methods as appropriate.

I think Perl one liners are very appropriate for Perler's who are writing Perl everyday and who are experienced and fluent in the language. And where the code is some special "one shot" deal. I don't think any kind of one liner is appropriate for beginners.

I am lazy in the sense that I don't like writing code more than once. If the code in the one liner is going to have continued use, then I prefer to put that code in a file with an appropriate name.