in reply to Error decoding XML

As a general point you could assign $xml using a here doc. e.g.
my $xml = <<XML; <hdsso> <hpid>--------</hpid> <pin>abcbs-hd</pin> <fname>--------</fname> <mname/> <lname>-------</lname> <dob>-------</dob> <email>-------</email> <ls>----------</ls> <ws>---------</ws> </hdsso> XML

Unrelated to the question but you might want to set the P3P header usng the webservers 'add header' facility. The P3P cookie policy is expected to be set for the whole server rather than a particular URL.