Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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.


In reply to Re: Starting a New Script by ambrus
in thread Starting a New Script by LloydRice

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-20 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found