Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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
Domain Nodelet?
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 chilling in the Monastery: (1)
As of 2021-10-17 12:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (71 votes). Check out past polls.

    Notices?