Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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;

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 examining the Monastery: (8)
As of 2016-09-26 22:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (492 votes). Check out past polls.