Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Argument "" Isn't numeric in numeric eq (==)

by RMGir (Prior)
on Feb 09, 2014 at 15:49 UTC ( [id://1074132]=note: print w/replies, xml ) Need Help??


in reply to Argument "" Isn't numeric in numeric eq (==)

You could just disable warnings, but why not say what you intend?

If you want blank entries to be 0, just make them so:

# Consider all blank entries to be 0. foreach (@f) { $_ = 0 unless length $_; }
After that, all your ""'s become zeros, and == will behave just fine.

Mike

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-03-19 08:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found