Код: Выделить всё
foreach my $i (@{$automacro{$am}->{spirit}}) {next CHKAM unless checkCond($char->{spirits} or 0, $i)}
лечится оно добавлением скобок:
Код: Выделить всё
foreach my $i (@{$automacro{$am}->{spirit}}) {next CHKAM unless checkCond(($char->{spirits} or 0), $i)}
