Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 musing on the Monastery: (7)
As of 2014-08-20 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (111 votes), past polls