Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: How to avoid an alphabet and integer next to it in a string?

by kcott (Bishop)
on Mar 21, 2014 at 21:00 UTC ( #1079356=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to avoid an alphabet and integer next to it in a string?
in thread How to avoid an alphabet and integer next to it in a string?

I haven't used Chemistry::MolecularMass previously (in fact, I wasn't aware of its existence until now); however, looking at its documentation, it would appear another (completely untested) solution would be:

use Chemistry::MolecularMass; my $mm = Chemistry::MolecularMass::->new(); $mm->replace_elements(H => 0); my $no_H_mass = $mm->calc_mass($your_formula);

-- Ken

  • Comment on Re^3: How to avoid an alphabet and integer next to it in a string?
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2019-07-19 15:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?