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

Re^2: An Array without an Index

by Anonymous Monk
on Aug 13, 2012 at 09:10 UTC ( [id://987078]=note: print w/replies, xml ) Need Help??


in reply to Re: An Array without an Index
in thread An Array Without and Index

The my in the while loop creates a new @row variable each time through the loop. This is almost certainly not what you wanted.

Actually it most certainly is -- the @row=(); is what is an error -- probably because OP isn't using strict and warnings

Replies are listed 'Best First'.
Re^3: An Array without an Index
by CountZero (Bishop) on Aug 13, 2012 at 13:54 UTC
    He said the program runs under strict and warnings.

    But the @row = () and the my @row in the while loop are two distinct variables. Since he is not using the first @row, it does not seem to be the cause of his problems.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

      He said the program runs under strict and warnings ... it does not seem to be the cause of his problems.

      Of course, this is just a symptom ( not coping with scoping ) ; the cause is indeterminable.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-19 05:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found