for my $d ( $xmlResponse->dataof("//MT_LABEL_IN/HEADER/*") ){ print "$d ", $d->name, " = ", $d->value, "\n", } __END__ SOAP::Data=HASH(0xa6a76c) material = 12659-250GM SOAP::Data=HASH(0xa6ab5c) batch = D00166202 SOAP::Data=HASH(0xa6af74) material_desc = Albumin, Bovine Serum, Fract 1PC x 250GM SOAP::Data=HASH(0xa6b744) plant = US05 #### sub ppp { use Data::Dumper(); return Data::Dumper->new( [@_] )->Sortkeys( 1 )->Purity( 1 )->Indent( 0 ) ->Useqq( 1 )->Dump . '$VAR1;'; } ## end sub ppp