#!/usr/bin/perl
use strict;
use warnings;
use Bio::Phylo::IO 'parse_tree';

my $tree = parse_tree(
	'-format' => 'newick',
	'-handle' => \*DATA,
	'-as_project' => 1,
);

print $tree->to_newick;

__DATA__
(A,'Yan''s ridiculous taxon name');