Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Perl 5 numeric type and simplifications

by BillKSmith (Monsignor)
on May 06, 2021 at 03:55 UTC ( #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
  • Comment on Re: Perl 5 numeric type and simplifications

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? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2021-11-27 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?