in reply to Loop Question
There isn't enough context here to give definitive answers to your questions.
As written, it's potentially an infinite loop. The loop will run while the condition $CustomerNumber = $Data{"CustomerNumber"} evaluates as true, which will be the case as long as the thing on the right-hand side of that equals sign evaluates as true (see What is true and false in Perl? for an explanation). Presumably, that should be == instead of = in that line (== is for testing, = is for assignment).
update I thought I'd put this in already, but I guess I hadn't : since it *appears* that the loop should only be executed once (you're not changing anything obviously related to the condition being tested), this should probably be an if rather than a while.
Within the loop, it looks like the code queries a database of some sort, and sets a few variables based on what it finds in the database. For any function you're having trouble understanding, read the output of
for more information.perldoc -f [function I don't know]
HTH!
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Loop Question
by Anonymous Monk on Mar 21, 2001 at 21:39 UTC | |
by arturo (Vicar) on Mar 21, 2001 at 22:00 UTC | |
by Anonymous Monk on Mar 21, 2001 at 22:32 UTC | |
by arturo (Vicar) on Mar 21, 2001 at 22:43 UTC | |
by Anonymous Monk on Mar 21, 2001 at 22:52 UTC |