I am new in perl pls tell how to rearrange the merge file
I want change the arrangement like file4.xml, file2.xml,file3.xml & file1.xml
sample files:
file1.xml
<merge_file1.xml>
heading1
<author>first author
sdasdasda
<!--page 1-->
<interaction-entry>
<agent>Methadone<!--page 2-->
<image src="filename-001.tif">
</style> <link
Diagram 1 any text</image>
<bar>
<effect id="fdf">'May <!--page 4-->increase ˵ methadone.foorrr clearance
<action>'Monitor patient' for ¡ withdrawal symptoms.
<!--page 5-->
<body> barlish </body>)
<image src="filename-003.tif">
<heading>
<p_ph4>Indications #997mh and dosages<!--page IV-->
<author>second author
<action>barted )<!--page V-->
<style name="supscrpt">0</style>
<style name="supscrpt">o</style>
</link> <link>
</link><link>
file2.xml
<merge_file2.xml>
heading1
<author>first author
sdasdasda
<!--page 1-->
<interaction-entry>
<agent>Methadone<!--page 2-->
<image src="filename-001.tif">
</style> <link
Diagram 1 any text</image>
<bar>
<effect id="fdf">'May <!--page 4-->increase ˵ methadone.foorrr clearance
<action>'Monitor patient' for ¡ withdrawal symptoms.
<!--page 5-->
<body> barlish </body>)
<image src="filename-003.tif">
<heading>
<p_ph4>Indications #997mh and dosages<!--page IV-->
<author>second author
<action>barted )<!--page V-->
<style name="supscrpt">0</style>
<style name="supscrpt">o</style>
</link> <link>
</link><link>
file3.xml
<merge_file3.xml>
heading1
<author>first author
sdasdasda
<!--page 1-->
<interaction-entry>
<agent>Methadone<!--page 2-->
<image src="filename-001.tif">
</style> <link
Diagram 1 any text</image>
<bar>
<effect id="fdf">'May <!--page 4-->increase ˵ methadone.foorrr clearance
<action>'Monitor patient' for ¡ withdrawal symptoms.
<!--page 5-->
<body> barlish </body>)
<image src="filename-003.tif">
<heading>
<p_ph4>Indications #997mh and dosages<!--page IV-->
<author>second author
<action>barted )<!--page V-->
<style name="supscrpt">0</style>
<style name="supscrpt">o</style>
</link> <link>
</link><link>
file4.xml
<merge_file4.xml>
heading1
<author>first author
sdasdasda
<!--page 1-->
<interaction-entry>
<agent>Methadone<!--page 2-->
<image src="filename-001.tif">
</style> <link
Diagram 1 any text</image>
<bar>
<effect id="fdf">'May <!--page 4-->increase ˵ methadone.foorrr clearance
<action>'Monitor patient' for ¡ withdrawal symptoms.
<!--page 5-->
<body> barlish </body>)
<image src="filename-003.tif">
<heading>
<p_ph4>Indications #997mh and dosages<!--page IV-->
<author>second author
<action>barted )<!--page V-->
<style name="supscrpt">0</style>
<style name="supscrpt">o</style>
</link> <link>
</link><link>