Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Starting a New Script

by ambrus (Abbot)
on Sep 20, 2016 at 08:27 UTC ( #1172204=note: print w/replies, xml ) Need Help??

in reply to Starting a New Script

How do I start a new perl script? Usually it happens when a one-liner grows too big (more than about five lines), or I find that I will want to run it again later. In that case, I copy the one-liner into a text file, and add some line breaks and other cleanups to make it more readable as it grows bigger.

Less often, I already know that I want to make a long re-usable script, in which case I just type something like

#!perl use warnings; use 5.014; print "hello, world,"; __END__
into a script, run it, then grow it from there.

In either case, I try to add code for the things it should do, one by one in order. I try to ensure that at each stage when I add a new part, I can run the script and get some sort of feedback diagnostic so I can see that it works. Eventually, I get a complete script I can run or modify.

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2023-12-09 18:06 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (38 votes). Check out past polls.