help on a perl script to edit file

Hi,

sample file looks like this..

<hp>
<name>
<detail>adsg</detail>
...
...
</name><ft>4264</ft>
</hp>

I need to edit the last but one line using perl script. I want the format to be ..

<hp>
<name>
<detail>adsg</detail>
...
...
</name>
<ft>4264</ft>
</hp>

Thanks

Like s%</name><ft>%</name>\n<ft>% you mean?

sorry i did not get your question but, all i need is to split the last but one line into 2lines ..

</name><ft>4264</ft>

CONVERT TO

</name>
<ft>4264</ft>

Please let me know if i am not clear on this.

Thanks--

Maybe guess what I posted was not a question, but a snippet of Perl?

oh .. is it a perl code that you are suggesting??

Any help on this one please .. thanks

please don't bump up

please do read the rules of the forum :slight_smile:

something like this

sed 's/<\/name>/<\/name>\n/' a1

hi,
sorry about that .. will make sure that wont happen again.

thanks for your reply, but i am looking for perl code, can you be able to help me with that.
Thanks again!

And are you at all familiar with Perl?