I am new to Perl
<nst:root arg='1' arg2='2' arg3='3'>
<a>1</a>
<b>2</b>
</nst:root>
I want 2 variable like,
$root = '<nst:root arg='1' arg2='2' arg3='3'>';
$rootClose = '</nst:root>';
I want a regular expression for this. Because I can not read line by line. My xml file can be like below also
<nst:root arg='1' arg2='2' arg3='3'><a>1</a><b>2</b></nst:root>
I don't want to read a full file. Because I have 100's of file and one file contains more than 10k line.