in reply to Re^2: creating an xml file from perl
in thread creating an xml file from perl

You just stick the literal "/images/" in there. A-like so:
print qq(<item id="$t" imageURL="/images/$filename" /> \n);
And if you really meant to chop off the extension, you'd do
print qq(<item id="$t" imageURL="/images/$nfile" /> \n);