in reply to Reading a particular values from the file.
Best way to handle XML is to use XML modules such as XML::Simple, XML::Twig, etc.....
Here is the code which will do what you need....
use strict; use warnings; my $data=<DATA>;#As only one line in the file... my @member_nos = $data=~m/<member_id>(\d+)/g; print join $/,@member_nos; __DATA__ <member_id>60</member_id><a>a</a><b>b</b><member_id>74</member_id><mem +ber_id>83</member_id>
Regards,
Murugesan Kandasamy
use perl for(;;);
|
|---|