Saturday, July 2, 2011

Run loop forever

Strangely enough, this question was asked to us. And there can be instances where the use of a "forever loop" would be appropriate. If you ever need to implement this, it is very simple.

In Perl I'd do it like this:

while (1) {
.
test stuff here
.
}

OR

for (;;) {
.
test stuff here
.
}

That's it! Its really that simple ;)

No comments:

Post a Comment

Creative Commons License
VGP-Miami Web and Mobile Automation Blog by Alfred Vega is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.