develooper Front page | perl.beginners | Postings from January 2002

SubRoutine Help

Thread Next
From:
Dragon Nebula Web Design
Date:
January 6, 2002 21:38
Subject:
SubRoutine Help
Message ID:
3C38FEAE.5070407@yahoo.com
Okay, first, this is NOT a homework question for the good reason that I
am not currently in college. I am teaching Perl to myself, and I've
managed to make it to the exercises in Chapter Four of the Llama, Third
Edition and I'm stuck. In this case, RTFMing is not helping (and I'd
rather not resort to the answer in the back of the book). The subroutine
in the attached program is supposed to bring back the sum of the @fred
array and the data input for $user_total. My problem is this, I can get
the subroutine to take <stdin> and it applies it to @fred (which is
wrong), and I can get it to take in <stdin> for the $user_total, but it
doesn't add them.

My question is, what am I not doing right? I don't want the answer to
the program, just a point in the right direction in TFM. BTW, this
exercise is only supposed to take 12 min or so, I've been working on it
for nearly 4 hrs total.
-- 
Dragon Nebula Web Design. It's your universe, take no chances!
http://nebula_web_design.tripod.com
Joseph A Nagy Jr
Owner


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About