The or part allows for a statement to be executed if the main part fails. : For « Statement « Perl
The or part allows for a statement to be executed if the main part fails.
"Can't open \"$filename\""
Related examples in the same category
A program that prints the numbers from 1 to 5 using the for statement.
Create an infinite loop using a for loop:
Here is an example of the for loop
Initialization, test, and increment, decrement of counters is done in one step
Loop Control Statements
Looping through an array with the for repetition structure
Nested for loop
Put more than one statement first and third part of for statement
Reference array length in for loop
Reference for loop control variable
Standard for structure: Loops 5 times, printing the multiples of 5 from 0-20
Sums the numbers from 1 to a specified number and also sums the even numbers.
The for Loop
Use for loop to output all elements in an array
Use for loop to output the element one by one in an array
Uses the for statement to read four input lines and write three of them.
Using block labels with next.
Using for loop to sum the total
Using my inside for statement
Using nested for loop to assign value to two dimensional array
Using nested for loop to output the elements in a two-dimensional array
You can use a for loop to loop for a specific number of times.
Mixed diamond operator with for loop condition
Mixed diamond operator with for loop condition 2
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.