Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Bug in Class::Struct?

by swl (Parson)
on Apr 23, 2020 at 04:46 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11115928]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-24 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found