Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Questionon foreach loop syntax

by ssandv (Hermit)
on Mar 10, 2010 at 21:37 UTC ( [id://827904]=note: print w/replies, xml ) Need Help??


in reply to Questionon foreach loop syntax

Perlmonks is a place where other Perl users, on a strictly voluntary basis, help one another solve problems. Instead of posting code and asking us if it's right, post code *and the results of running it*, and ask us to resolve the differences between what you thought it would do and what it did. There's almost no reason to post code without running it first. Monks may be wrong about what it will do when executed, but the compiler won't. You should ask the compiler what your code does (by running it).

As for your code, it's not at all clear what you're trying to accomplish, but as it stands, you're doing scalar assignment to the same variables on each pass through the loop, as near as I can tell, so everything's going to get clobbered. That doesn't seem like what you want, but I could be wrong.

Log In?
Username:
Password:

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

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

    No recent polls found