use Tie::DATA(':xml'); # predefined format foreach(keys %DATA) { print "$_ = $DATA{$_}\n"; } __DATA__ yadda yadda yadda... ee-aye ee-aye oh woof woof