Create an infinite loop using a for loop: : For « Statement « Perl






Create an infinite loop using a for loop:

    

    #!/usr/local/bin/perl -w

    for (;;)
    {
       print "This is the loop that never ends...\n";
    }

   
    
    
    
  








Related examples in the same category

1.A program that prints the numbers from 1 to 5 using the for statement.
2.Here is an example of the for loop
3.Initialization, test, and increment, decrement of counters is done in one step
4.Loop Control Statements
5.Looping through an array with the for repetition structure
6.Nested for loop
7.Put more than one statement first and third part of for statement
8.Reference array length in for loop
9.Reference for loop control variable
10.Standard for structure: Loops 5 times, printing the multiples of 5 from 0-20
11.Sums the numbers from 1 to a specified number and also sums the even numbers.
12.The for Loop
13.The or part allows for a statement to be executed if the main part fails.
14.Use for loop to output all elements in an array
15.Use for loop to output the element one by one in an array
16.Uses the for statement to read four input lines and write three of them.
17.Using block labels with next.
18.Using for loop to sum the total
19.Using my inside for statement
20.Using nested for loop to assign value to two dimensional array
21.Using nested for loop to output the elements in a two-dimensional array
22.You can use a for loop to loop for a specific number of times.
23.Mixed diamond operator with for loop condition
24.Mixed diamond operator with for loop condition 2