in reply to Converting Bracketted String (Newick's) into Array of Array
Didn't you check $@ to see what error eval found? You forgot about quoting.
for ($str) { s/\\/\\\\/g; s/'/\\'/g; s/\(/['/g; s/\)/']/g; s/,/','/g; }
Update: Bah, that's buggy, but you get the idea. I'm not gonna fix it, cause it's more effort making this work with eval EXPR than developing a safer solution (i.e. one that doesn't use eval EXPR).
|
|---|