Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: use warnings is complaining

by SuicideJunkie (Vicar)
on Aug 15, 2018 at 13:46 UTC ( #1220374=note: print w/replies, xml ) Need Help??


in reply to use warnings is complaining

Well, like your warning is telling you, " " is not a number.

So quite simply you need to either make it a number, or not require it to be a number.

You might do this by testing whether the value is all whitespace, and set it to "-" x 10 or sprintf '%10.2f' based on that test. Then when printing the blended values, use %10s.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2021-02-27 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?