Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I am learning PERL little by little. I have no programming background and I am having a tough time

No wonder you are having a tough time. On the other hand, "little by little" is the best way to learn anything new.

Taking a task and trying to program it is the best way... reading a computer language book can be quite dull otherwise, until probably later in our journey when we might become nerdy enough to get "Design Patterns" for night-time reading. ;-)

So, you've got a task. Now, forget about the language. Convert the tast into smaller tasks, in a stilted English-like text... call them instructions... each one of them suitably small... not so small that it becomes idiotic, and not so large that it cries out to be broken up. This is pseudo-code.

For example, for the task above, the pseuod code would be...

% somehow open the file for reading % read in line by line % discard lines not wanted % transform the wanted lines into html % print % close the file

Check the pseudo-code above and refine it. Then go about finding the methods and functions that will perform the above task. Always build a small part before continuing on to the next.

Here is another suggested task -- given a date, print out a month calendar. A lot of loops and arrays will come your way, and it will be a nice little task. When you finish this, change it to a week calendar, maybe a year calendar, etc.

Check out the tutorials on this site (the best thing about Perl), and CPAN (the second best thing about Perl).

Have fun.

--

when small people start casting long shadows, it is time to go to bed

In reply to Re: PERL newbie Cant figure out where to start by punkish
in thread PERL newbie Cant figure out where to start by jwashburn

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 pondering the Monastery: (3)
As of 2024-04-26 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found