Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 examining the Monastery: (7)
As of 2014-11-23 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (134 votes), past polls