# Convert php to perl -- writing xml

**URL:** <https://forum.kirupa.com/t/convert-php-to-perl-writing-xml/195459>\
**Category:** Uncategorized\
**Created:** [July 31, 2006, 10:52pm UTC](https://forum.kirupa.com/t/convert-php-to-perl-writing-xml/195459 "2006-07-31T22:52:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wuuf](https://avatars.discourse-cdn.com/v4/letter/w/5e9695/32.png) [@wuuf](https://forum.kirupa.com/u/wuuf)\
**Post date:** [July 31, 2006, 10:52pm UTC](https://forum.kirupa.com/t/convert-php-to-perl-writing-xml/195459/1 "2006-07-31T22:52:47Z")

</div>

i need to take a simple php script that writes xml and convert it to a perl script

can anyone who knows perl give me a hand?

\<?php  
$filename = “/home/users/web/bbbb/xxxxx/htdocs/data/collection.xml”;  
$raw\_xml = file\_get\_contents(“php://input”);

print $raw\_xml;

$fp = fopen($filename, “w”);  
fwrite($fp,$GLOBALS[‘HTTP\_RAW\_POST\_DATA’]);  
fclose($fp);  
?\>

thanks…
