use GD::Something; # maybe GD::SVG::Render? my $image = GD::Something->new(400, 300); $image->render('/my/file.svg'); print $image->png();