我是新手Perl
<nst:root arg='1' arg2='2' arg3='3'>
<a>1</a>
<b>2</b>
</nst:root>
我想要2个变量,例如,
$root = '<nst:root arg='1' arg2='2' arg3='3'>';
$rootClose = '</nst:root>';
我想要一个正则表达式。因为我无法逐行阅读。我的 xml 文件也可以如下所示
<nst:root arg='1' arg2='2' arg3='3'><a>1</a><b>2</b></nst:root>
我不想阅读完整的文件。因为我有 100 个文件,一个文件包含超过 10k 行。