Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

very new at perl programming

0 views
Skip to first unread message

John & Margaret Thurman

unread,
Dec 15, 2001, 2:27:36 AM12/15/01
to
I am just starting out to learn PERL. I've programmed in Basic years ago.
but have recently started to get back into computers. However, Have I come
to the right newsgroup for a new programmer to get question answered?


Logan Shaw

unread,
Dec 15, 2001, 4:05:44 AM12/15/01
to
In article <cZCS7.16$Ru1....@newsfeed.slurp.net>,

This is probably the right place, but it won't do very well to
try to learn programming through asking questions in a
newsgroup. There is just too much to learn. (I don't mean to
imply that you know _nothing_ about programming, but if your
only experience is with BASIC, you'll find that there are now
languages in common use that have much, much more to offer, and
it can take some real effort to learn to take advantage of what
they offer. And there will be lots of useful ideas that you may
not have run into, some of which are a little weird at first.)

I suggest you get a book and read that, or maybe take a course in
programming, because you will have MANY questions. One book that
you might consider is called "Elements of Programming with Perl".
From what I understand, It's meant to teach programming with Perl
as the example language. There's a web site for the book at
http://www.manning.com/Johnson/ and the ISBN is 1884777805.

There is also the classic "Learning Perl", by Randal Schwartz
(who you'll find on this group from time to time). It's more
geared toward Perl than programming in general, so you may find
more useful information about Perl in it than in the other.

Having said all that, if you've got a book or two and you're
working through it and there's something about Perl you just don't
get despite having read the documentation, then this is the place
to ask that kind of stuff. When doing so, it always helps to
explain what you're trying to do, what code you've written, and
what you think it should do or what you don't understand about how
it's behaving. Try to get the shortest piece of code that shows
the problem you're having. That will help everyone here (they
won't have to read lots of unrelated stuff) and it also will help
you understand just what is causing the problem and what isn't.

Hope that helps.

- Logan
--
"In order to be prepared to hope in what does not deceive,
we must first lose hope in everything that deceives."

Georges Bernanos

Tad McClellan

unread,
Dec 15, 2001, 10:01:55 AM12/15/01
to
Logan Shaw <lo...@cs.utexas.edu> wrote:
>In article <cZCS7.16$Ru1....@newsfeed.slurp.net>,
>John & Margaret Thurman <flo...@stignatius.net> wrote:

>>I am just starting out to learn PERL.

>>Have I come


>>to the right newsgroup for a new programmer to get question answered?


Yes, if you have spent several minutes trying find the answer
yourself first.

Usenet is the last resource (because articles go to thousands
of people and computers around the world). You post when all
else has failed.

The first-line resources give better answers than the answer
you are likely to get in reply to a newsgroup posting too.

>Having said all that, if you've got a book or two and you're
>working through it and there's something about Perl you just don't
>get despite having read the documentation, then this is the place

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


>to ask that kind of stuff.


There is some info on how to access Perl's standard documentation
using the "perldoc" program at:

http://mail.augustmail.com/~tadmc/clpmisc.shtml

It offers other hints for getting the most out of the newsgroup as well.


--
Tad McClellan SGML consulting
ta...@augustmail.com Perl programming
Fort Worth, Texas

Tad McClellan

unread,
Dec 15, 2001, 10:01:56 AM12/15/01
to
John & Margaret Thurman <flo...@stignatius.net> wrote:

>Have I come
>to the right newsgroup for a new programmer to get question answered?


[ other followups have addressed your direct question, I'm just
adding more information.
]

At the end of the Perl training classes I teach, I present a
checklist to use when you get stuck on a Perl problem.

Here it is:


----------------------------------
Perl problem resolution checklist:
----------------------------------

1) check the Perl FAQs

(word search with "perldoc -q". Or better, find where the
*.pod's are on your system, and word search (grep) the
entire contents of the files)

2) expand the above to _all_ of the standard *.pod files.

3) check a Usenet archive such as:

http://groups.google.com/advanced_group_search

4) check books and websites (this step is optional)

5) write a Usenet article, but don't post it yet!

5a) make a small and complete (including data) program that
people can execute that shows your problem.

5b) state how the program's output is not what you want. Describe
what you want.

5c) repeat steps 1-4 using search terms taken from your description
of the problem or your Subject header (try some synonyms for
the terms also)

6) Give up on a quick answer. Post to Usenet for a slow answer.

7) wait hours/days/forever for followups with answers rather than
than the 5 or 10 minutes it would have taken if steps 1-3
had worked.

8) Wonder at the quality of the answers given, rather than know
it is a peer-reviewed, validated answer if steps 1-2 had worked.

9) Repeat steps 1-3 many times for many problems. You will seldom
get past step 3, and even less often get past step 5a.

10) Now that you know so much, go *answer* some questions on Usenet :-)


-----

To help with 1 and 2 above, I make "headlines" files to grep in,
because sometimes there is Too Much Information when grepping
the entire bodies:

cd /an/INC/dir/pod/

grep '^=' perlfaq[1-9].pod >faq.heads

grep '^=' *.pod >all.heads

Tad McClellan

unread,
Dec 15, 2001, 10:44:27 AM12/15/01
to
I myself <ta...@augustmail.com> wrote:

>----------------------------------
>Perl problem resolution checklist:
>----------------------------------


Of course, there is some talking that goes with the points...


>1) check the Perl FAQs
>
> (word search with "perldoc -q". Or better, find where the
> *.pod's are on your system, and word search (grep) the
> entire contents of the files)


Some things to try to find where the *.pod files got installed
on your system:

1) perldoc -l perl

2) perl -V (look in the @INC dirs for subdir named "pod/")

3) perl -e 'print "$_\n" for @INC' (and look for "pod/")


If they did not get installed, then:

1) curse the sysadmin who installed it without its docs

2) direct *all* future Perl questions to the aforementioned
sysadmin until they do their job.

3) download the source distribution, find and copy the *.pods
to a safe place, and delete the distribution. (but now the
docs may be for a perl version other than the version
you are actually using, so ask the sysadmin the question
again every two hours until it gets answered. Tell all
your co-workers to do the same).


>2) expand the above to _all_ of the standard *.pod files.


Another hint is to try search terms with an Initial Cap first,
as that is likely to be a section/paragraph/sentence that is
about that topic. eg. "Slices" before trying "slices".


>3) check a Usenet archive such as:
>
> http://groups.google.com/advanced_group_search
>
>4) check books and websites (this step is optional)


Most Perl books and websites are, uh... sub-optimal.

Oh let's forget that politically correct stuff, most Perl books
and websites are crap. There are lots of good ones, but even
more bad ones.

You need to consider carefully which books and websites
are "OK", and which are likely to end up being misleading.


>5) write a Usenet article, but don't post it yet!
>
> 5a) make a small and complete (including data) program that
> people can execute that shows your problem.


If your problem requires file input, use the DATA filehandle
and __DATA__ token to embed the file contents in the same
file as the Perl program. (perldoc perldata)

0 new messages