Perl Syntax
The my keyword is used to declare variables.
Variables names are appended with the $ symbol.
Conditional operators like
if(){
...
} else {
...
}
give different options for different conditions.
For instance:
if(age > 18){
print("You are grown-up now.");
} else {
print("You are still young.");
}
Iteration operations are done using loops:
while loop:
while(){
...
}
and
for loop:
for(){
...
}.