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
In reply to Re^3: How to avoid an alphabet and integer next to it in a string?
by kcott
in thread How to avoid an alphabet and integer next to it in a string?
by piscean
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |