Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: subroutine help

by tobyink (Abbot)
on Nov 29, 2012 at 09:05 UTC ( #1006203=note: print w/ replies, xml ) Need Help??


in reply to Re: subroutine help
in thread subroutine help

A few evil examples:

  • Ca(OH)2
  • CH3CH2CH2CH2CH2CH2CH3
  • CH3[CH2]5CH3
  • CH3[CH2]nCH3 - not really calculable, but should be parsable
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re^2: subroutine help
Re^3: subroutine help
by space_monk (Chaplain) on Nov 29, 2012 at 09:13 UTC
    Yes, alright my solution is lightweight, only getting the second of your examples right, lets use Chemistry::Mol to get it right properly :-)
    A Monk aims to give answers to those who have none, and to learn from those who know more.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2015-07-05 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls