Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Help with a programming problem.

by Anonymous Monk
on Sep 06, 2012 at 00:46 UTC ( #991985=note: print w/replies, xml ) Need Help??

in reply to Help with a programming problem.

I didn't mean to give such a short answer. You are just learning the language. One problem was in your line for ($count1 = 0; $count1 < $i2; $count++) . That should $count1++. You dropped the '1' at the end of the name. This is an example of where, by enabling strict and warnings, perl would have caught the error and reported it to you.

This requires you to declare all the variables in the program. Some of the variables are declared and some are not. You need to declare all of them. Like in the line with the error, you could declare the loop variable, my $count1

for (my $count1 = 0; $count1 < $i2; $count1++)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://991985]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2018-06-21 20:40 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (119 votes). Check out past polls.