Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Can Perl do calculations?

by Anonymous Monk
on Jan 08, 2005 at 05:43 UTC ( [id://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.


    Dave

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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-19 04:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found