note
tinita
the first call of ok():<br>
the first argument is <c>$errors && ($errors->[0] =~ /.../i)</c> which results in $errors being passed as the first argument. before it is passed, array element 0 gets autovivivied though by usage in the second argument.<br><br>
the second call:<br>
$errors is now true, so the matching is executed and its result would the empty string ("false"). but since the matching is executed in list context, the result is an empty list, so what you wrote as a second argument becomes now the first argument.
1017390
1017398