in reply to Format weird behaviour

I can't help myself, even though I'll probably lose XP. Why in the name of whatever_deity_you_like wouldn't you just say:
$item="heat741a" ; $OrderQty = 55; open(LOG, ">order.xml") || die "Can't open the log file: $!\n"; print LOG qq(<?xml version="1.0"?> <order> <product>$item</product> <quantity>$OrderQty</quantity> </order>);
I never use formats unless I want something that automatically paginates or wraps blocks of text in columns. Update: removed trailing \n which might have caused well-formednes complaints.