Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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
Node Status?
node history
Node Type: note [id://1172204]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2020-09-18 20:48 GMT
Find Nodes?
    Voting Booth?
    If at first I donít succeed, I Ö

    Results (113 votes). Check out past polls.