in reply to Re^2: Finding the parent of a text in a file
in thread Finding the parent of a text in a file

I ran it on the input you provided, I changed the 2nd file a bit more and got the following result:
- 5 /system/security/management-ip/protocol/shutdown + 5 /system/security/management-ip/protocol/reboot - 7 /system/security/management-ip/protocol/entry 1 - 8 /system/security/management-ip/protocol/entry 1/snmp ok + 7 /system/security/management-ip/protocol/entry 2 + 8 /system/security/management-ip/protocol/entry 2/snmp ok
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^4: Finding the parent of a text in a file
by ExperimentsWithPerl (Acolyte) on Sep 04, 2015 at 23:39 UTC

    Thanks Choroba.
    Is it taking more time to complete.Because the code is showing no progress for few minutes.
    I tried to give some print statement just outside and inside the compare loop but nothing got printed.

      If your files are large, it's possible. Diff is hard.
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

        Thanks Choroba.:)
        I tried the code with 6 lines file, I got immediate result .
        Will try with larger file.
        Will update about the result.