Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Perl 5 numeric type and simplifications

by BillKSmith (Monsignor)
on May 06, 2021 at 03:55 UTC ( [id://11132120]=note: print w/replies, xml ) Need Help??


in reply to Perl 5 numeric type and simplifications

The choice between print and printf depends on how badly you 'rely' on the format. The former usually does what you want with less effort. It may even be better for a special case that you forgot about. An occasional 'long number' may be annoying, but does no real harm if you are calculating the next move in your fantasy football game. In another application, the same behavior could spoil a whole batch of expensive forms (or worse). Clearly the latter is called for. They each have advantages. It is part of a Perl programmer's job to choose appropriately for each application.
Bill

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-03-28 20:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found