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?
my $molform = <STDIN>;
$molform =~ s/[^a-zA-G0-9]//g;
my $molmass = new Chemistry::MolecularMass;
my $mass = $molmass->calc_mass("$molform");
Just eliminate the Hydrogen:
$molform =~ s/H\d*//g;
Throwing nuclear weapons into the sun
Making everybody on Earth disappear
A threat from an alien with a mighty robot
A new technology or communications medium
Providing a magic fish to a Miss Universe
Establishing a Group mind
Results (166 votes). Check out past polls.