http://qs321.pair.com?node_id=223771

winefm has asked for the wisdom of the Perl Monks concerning the following question:

I have some doubts in pattern matching in perl. I am unable to take more than one line in xml file, the file is as below:
<profile> <emp> <name>Mahesh</name> <age>24</age> <address>New york</address> <desig>Developer</desig> </emp> </profile>
I need to extract data from <emp>.*</emp>, so that I used code like below:
open(F, "<prof.xml"); while(<F>) { $_ =~m/(<emp>.*<\/emp>)/m); print "$1\n"; }
but I am unable to extract data, Please help me.

update (broquaint): removed HTML tags and added <code> tags