in reply to not fetching correct records in xml output
You have not iterated over the nodeset returned by $xp->find so you only get one value back. See the docs for XML::XPath for an example of how to do that (it's right in the synopsis so I'm surprised you missed it).
And if you want to dump an array, pass the reference to Dumper:
#!/usr/bin/env perl use strict; use warnings; use Data::Dumper; my @records = qw/a b c/; print "Array: " . Dumper @records; print "Array ref: " . Dumper \@records;
|
|---|