http://qs321.pair.com?node_id=11115928


in reply to Bug in Class::Struct?

If you need a zero on fail then perhaps try being explicit with a ternary condition or by adding zero.

holding => ($vol =~ m/^HOLDING/ ? 1 : 0), holding => $vol =~ m/^HOLDING/ + 0,

See also https://perlmaven.com/boolean-values-in-perl.