--- Antti Eskola <[EMAIL PROTECTED]> wrote: > Hi everybody. > > is the some wrong in this syntax, i have a mystical, possibly a infinite > loop proble. > > if(!(("Avataanyhteys="."$lomaketaulu[1]") eq $etahallinta[$i])){for_x7();} > > > Regards, > <|- Antti Eskola -|>
Your syntax is correct, but it can be a bit difficult to follow. I've simplified it to the following: if( "Avataanyhteys=$lomaketaulu[1]" ne $etahallinta[$i] ) { for_x7(); } Essentially, you're asking if those two things are *not* equal. I'm not sure if that's what you meant, but that's what the code says. Also, I'd be wondering exactly how $etahallinta[$i] is going to start with "Avataanyhteys=" followed by the contents of $lomaketaulu[1]. That's an awfully odd (though perfectly legal) value to have in a variable and I can't help but wonder if you intended something a bit different. Now, if you're worried about a possible infinite loop, it's probably going to be in your for_x7() subroutine. The if statement by itself will not likely generate an infinite loop. If this doesn't solve your problem, reducing your code to a minimal test case and posting it would help. Cheers, Curtis "Ovid" Poe ===== "Ovid" on http://www.perlmonks.org/ Someone asked me how to count to 10 in Perl: push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//; shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A __________________________________________________ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]