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

Thank you Choroba.This indeed looks useful.
However this code is not able to proceed beyond
$line = join '/', @path;
(just before # Compare the lines)
Its getting stuck there.

  • Comment on Re^2: Finding the parent of a text in a file

Replies are listed 'Best First'.
Re^3: Finding the parent of a text in a file
by choroba (Cardinal) on Sep 04, 2015 at 23:06 UTC
    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
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      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.
        لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ