Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Jamnet's scratchpad

by Jamnet (Scribe)
on Jun 05, 2004 at 10:37 UTC ( [id://361453]=scratchpad: print w/replies, xml ) Need Help??

Hi My program is comparing values stored in 2 different array. My code is as follows
for ($xcntr = 0; $xcntr < scalar(@cgo_LineNo); $xcntr++) { $flag = "N"; for ($ycntr = 0; $ycntr < scalar(@con_LineNo) || $con_LineNo[$ycnt +r] > $cgo_LineNo[$xcntr]; $ycntr++) { if ($cgo_LineNo[$xcntr] == $con_LineNo[$ycntr]) { $flag = "Y"; } } }
but I want it to come out of for loop as soon as the value of $con_LineNo$ycntr is greater than $cgo_LineNo$xcntr
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found