Thanks for your reply, Sinan. You're right, I haven't checked the
posting guidelines (abject apologies from this thoroughly befuddled
newbie). Also I did not use warnings or strict, as that's not what our
instructor has us do, for better or worse.
Can we have some clarification here? Are you saying
1) Your instructor specifically told his class *not* to use warnings and
strict? or
2) Your instructor simply didn't tell his class to use them?
If 1) is the case, then your instructor is B A D, period. He's
deliberately teaching his students bad habits. In that case it looks
like *all* the fault lies with the instructor.
If 2) is the case, then your instructor isn't experienced enough in Perl
to be teaching it; that's probably not so much his fault as the
institution's fault for trying to cut corners in order to save money.
But if that's the case, the worst thing any of his students can do is
take the attitude "I don't need to do anything the instructor didn't
specifically tell me to do"; that's really the same as "I won't learn
this if it's not going to be on the test."
Assuming that your goal in taking a Perl class is more ambitious than
just being able to say "I took a Perl class once"--in other words,
assuming that your goal is to eventually be able to write Perl programs--
then you're hoping to reach a point where you *won't* have an instructor
telling you what to do and there *won't* be any examinations. But once
you reach that point, you *won't* know everything there is to know about
Perl programming (since your name isn't "Larry Wall") even though you'll
still need to know more about it. And that means being able to pick up
stuff on your own. That means becoming aware of what are considered
"best practices" in the field and observing them unless/until you're able
to articulate why your needs would be better served by something else.
When learning a programming language, you really *do* have to do a lot of
self-study beyond what's taught in the classroom and what's part of the
assigned coursework. Because if a class is taught properly, the
classroom time and the assignments will be devoted to only those aspects
of the language that are difficult to pick up through self-study; there
simply isn't time for what amounts to the instructor reading the textbook
or the widely-available reference material to his class.
With Perl, you're fortunate in that you don't have to go digging around
to find good reference material; it's already there on your computer!
The one thing a lot of people have to get used to is that Perl's
documentation is quite "information-dense" whereas most software
documentation is "information-sparse" (full of screen shots, lists of
menu items, and similar stuff that would be immediately obvious to anyone
who's ever used the software). There's a lot of meat on those bones!
But you don't have to eat it all at once. Just develop a basic mental
model of how the material is organized, so that when you have a question
nagging at you, you have some idea of where to look for the answer.
And probably the single most important important thing you can do is to
get in the habit of *always* looking for the answers to such questions,
even if they seem trivial or not of immediate importance (and if the
answers don't leave you completely enlightened, feel quite free to come
here and ask for clarification; questions of the form "I was wondering
about...It says in perlop that...But I still quite don't get...And I
wonder why it's done that way" are valuable not just to you, but to other
readers of the group, because they get people thinking, learning new
things, and re-examining old assumptions. You can learn an awful lot
simply by reading the responses to well-asked questions (WAQs) here).