Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: beginners trap: one liner

by Marshall (Canon)
on Jan 04, 2020 at 07:41 UTC ( [id://11110938]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11110938]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-03-28 16:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found