Search
 
SCRIPT & CODE EXAMPLE
 

PERL

perl do while loop

# Basic syntax:
do {
   code to run;
} while( condition );

# Example usage:
$i = 5;
do {
   print "Value of i: $i
";
   $i += 1;
} while( $i < 10 );
# Note, do..while loops are very similar to while loops except that they
#	always execute at least once
Comment

perl until loop

# Basic syntax:
until( condition ) {
   code to run;
}

# Example usage:
$i = 5;
until( $i > 10 ) {
   print "Value of i: $i
";
   $i += 1;
}
# Note, until loops are kind of the opposite of whiles loop, they loops over 
# 	the code until the condition becomes true
Comment

perl while loop

# Basic syntax:
while( condition ) {
   code to run;
}

# Example usage:
my $i = 5;
while( $i < 10 ) {
   print "Value of i: $i
";
   $i += 1;
}
Comment

PREVIOUS NEXT
Code Example
Perl :: perl add key to hash 
Perl :: perl sprintf YYYYMMDD sample 
Perl :: perl $ @ % 
Perl :: perl 
Perl :: perl format decimal 2 places not rounding 
Perl :: nested haah in perl 
Pascal :: pascal wait for key 
Pascal :: while loop in pascal 
Pascal :: turbo pascal online compiler 
Powershell :: call function powershell 
Gdscript :: godot check if timer is running 
Gdscript :: godot update value in progressbar 
Abap :: comments in abap 
Erlang :: erlang exit from shell 
Assembly :: error: failed to synchronize all the database archlinux 
Assembly :: that long word from mary poppins 
Assembly :: how to check assembly compatibility X64 and x86 
Javascript :: jquery vslidation remove spaces from input 
Javascript :: list all node processes 
Javascript :: javascript radian to degree 
Javascript :: check react version terminal windows 
Javascript :: jquery only number allowed to 10 digit 
Javascript :: count number of checkboxes in html jquery 
Javascript :: javascript lowercase string 
Javascript :: regex date validation mm/dd/yyyy 
Javascript :: how to console.log formData 
Javascript :: js scroll to id 
Javascript :: sleep for 1 second 
Javascript :: jquery css add important 
Javascript :: dconf-editor install terminal 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =