« 於: 十二月 06, 2016, 11:39:41 pm »
hello world
print "Hello World!\n";
perl hello.pl
if
$a = 10;
# check the boolean condition using if statement
if( $a < 20 ){
# if condition is true then print the following
printf "a is less than 20\n";
}
print "value of a is : $a\n";
for loop
# for loop execution
for( $a = 10; $a < 20; $a++ ){
print "value of a: $a\n";
}