Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: PERL newbie Cant figure out where to start

by punkish (Priest)
on May 01, 2006 at 20:58 UTC ( [id://546762]=note: print w/replies, xml ) Need Help??


in reply to PERL newbie Cant figure out where to start

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-03-28 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found