Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

by runrig (Abbot)
on Mar 21, 2014 at 19:20 UTC ( [id://1079340]=note: print w/replies, xml ) Need Help??


in reply to Re^8: 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?

Forget chomp, just do:
$molform =~ s/\s+$//;

Replies are listed 'Best First'.
Re^10: How to avoid an alphabet and integer next to it in a string?
by piscean (Acolyte) on Mar 21, 2014 at 19:26 UTC
    $molform =~ s/H\d*//g; worked for me except for Hg and He. Yup, I tried $molform =~ s/\s+$//;

    The output is zero

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-03-28 16:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found