my $y=$svg->group( id => 'group_y', style => { stroke=>'red', fill=>'green' } ); $y->circle(cx=>100, cy=>100, r=>50, id=>'circle_in_group_y_1'); # add a circle to the group $y->circle(cx=>100, cy=>100, r=>50, id=>'circle_in_group_y_2'); $y->comment('This is a comment'); $y->circle(cx=>100, cy=>100, r=>50, id=>'circle_in_group_y_3'); # now render the SVG object, implicitly use svg namespace print "\nfirst drawing\n"; print $svg->xmlify;