mardi 31 mai 2016

Multiple else if conditions true

I have multiple elsif conditions in a else if statement.

What is the flow of the statement if multiple conditions are true? So in the simplistic example below which serves as a demonstration only, is the the second elsif condition ever reached?

my $i = 1;

if ($i == 1){
}
elsif (i == 2){
}
elsif (i == 1){
}
else{
}

Aucun commentaire:

Enregistrer un commentaire