Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Assistance please

by Kenosis (Priest)
on Nov 21, 2012 at 20:57 UTC ( #1005010=note: print w/ replies, xml ) Need Help??


in reply to Assistance please

Hi, R3volution, and welcome to PerlMonks!

Perhaps the Module Chemistry::MolecularMass would be helpful to you. The following example, but using H2O, was adapted from the Module's site:

use strict; use warnings; use Chemistry::MolecularMass; my $chemical = 'H2O'; my $mm = new Chemistry::MolecularMass; my $mass = $mm->calc_mass($chemical); if ( defined $mass ) { print "The mass of $chemical is: $mass"; } else { print "Unable to calculate the mass of $chemical"; }

Output:

The mass of H2O is: 18.01528


Comment on Re: Assistance please
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (13)
As of 2014-10-31 15:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (219 votes), past polls