I am new to Perl. Does anyone know why Perl has 'elsif' and not 'elseif'?
I am doing something like this:
$somevariable = 0;
if ($idcount==5)
{
//do something
if (somestatement is true) // 1
{
$somevariable = 1;
}
}
elsif ($idcount > 1 && somevariable = 0)
{
//do something else here
}
The code never comes to the elsif statement. In this case idcount is actually 5, so it comes to the first if statement. But an inner if statement (1) is not true. so $somevariable is still 0. So since idcount is 5, it should come to elsif as well since $idcount is greater than 1 and $somevariable is still 0.
Maybe I am just tired and not seeing something obvious.