Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Bug in Class::Struct?

by swl (Priest)
on Apr 23, 2020 at 04:46 UTC ( #11115928=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11115928]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2020-10-20 00:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (208 votes). Check out past polls.

    Notices?