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

Re: Converting Bracketted String (Newick's) into Array of Array

by busunsl (Vicar)
on Sep 04, 2008 at 06:22 UTC ( #708935=note: print w/ replies, xml ) Need Help??


in reply to Converting Bracketted String (Newick's) into Array of Array

I'd go for something like this (untested):

# convert parens to brackets $str =~ tr/()/[]/; # quotes $str =~ s/(\w+)/'$1'/g; # eval my $aoa; $eval = '$aoa = ' . $str; eval $eval;


Comment on Re: Converting Bracketted String (Newick's) into Array of Array
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2015-07-30 23:46 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 (273 votes), past polls