Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Can Perl do calculations?

by Anonymous Monk
on Jan 08, 2005 at 05:43 UTC ( #420462=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Can Perl do calculations?
by davido (Cardinal) on Jan 08, 2005 at 05:52 UTC

    Yes, Perl can do calculations. Perl has all the standard mathematical operators; + (plus), - (minus), * (times), / (divide), and so on.

    If you want it to calculate PI to 300 digits, Perl is there for you too, but you've got to learn to program. A good place to start learning Perl is to read "Learning Perl", published by O'Reilly & Associates. You'll find it in most larger bookstores, as well as Amazon.


Re: Can Perl do calculations?
by rozallin (Curate) on Jan 08, 2005 at 07:21 UTC
    In addition to the excellent book that davido suggested, you might also find Simon Cozens' Beginning Perl, which is available free online, useful. Chapter 2: Working with Simple Values (PDF format) explains data types, variables and operators and is a good introduction to performing calculations using Perl.

    Rozallin J. Thompson
Re: Can Perl do calculations?
by gopalr (Priest) on Jan 08, 2005 at 09:17 UTC

    We can do calculation by using the below

    * + / -

    and Math::Complex Perl modules also do the engineering, science, and mathematics

Re: Can Perl do calculations?
by Mr. Lee (Scribe) on Jan 12, 2005 at 19:25 UTC
    Seriously, what about the opposite question:
    Is there any programming language that can't?
    Mr. Lee

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://420462]
Approved by davido
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2022-05-25 14:11 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (90 votes). Check out past polls.