Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by busunsl (Vicar)
on Sep 04, 2008 at 06:22 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://708935]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-04-25 19:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found