http://www.perlmonks.org?node_id=583107


in reply to how could i captured selected data of the input ?

In addition to the modules suggested in previous posts, you probably also want to take a look at how you are handling the raw data (assuming it really is XML, and not just a deceptively similar analogue) after you have loaded it. It looks like you are loading a simple table structure, so all you need to do is treat your data like a table in your code. There are modules that will help you do that as well (see e.g., DBD-AnyData). Hence, to directly answer your questions here is a psuedo-code example:
my $oTable = XML::Simple::XMLin($sFile); print $oTable->[1]; ## 1. print second record only print $oTable->[1]{chargeableduration}; ## 2. do that
This is pseudo-code because it ignores the real code needed to fulfill these assumptions: 1) you easily loaded your XML into an AoH; 2) you know the code to print out the second record is actually a bit more involved if you want some useful output; 3) you know the difference between an AoH and an AoA. If these assumptions are beyond your familiarity, have a shot at supersearch and let the learning begin.

=oQDlNWYsBHI5JXZ2VGIulGIlJXYgQkUPxEIlhGdgY2bgMXZ5VGIlhGV