in reply to Re: Script to compare 2 folders, including sub folders and files with content
in thread Script to compare 2 folders, including sub folders and files with content

Hi Hauke, Thanks for your reply and i've tried with your answer

 matches => sub { print "File contents $_[0] and $_[1] are identical.\n" }
but since i'm new to Subroutines so cant able to fit this in right place.

since i'm getting error like "Not a subroutine: 'matches'".
Can please give the correct place that where and how i need to call this.
  • Comment on Re^2: Script to compare 2 folders, including sub folders and files with content
  • Download Code

Replies are listed 'Best First'.
Re^3: Script to compare 2 folders, including sub folders and files with content
by haukex (Archbishop) on Jul 04, 2016 at 07:30 UTC

    Hi karthik.raju,

    I suggest you re-read the documentation of File::DirCompare closely, as it gives examples of the correct syntax with which to supply options: they are supplied as a hash reference ({ matches => ... }) as the last argument to the compare function. If you still have trouble please see How do I post a question effectively? and show the exact error messages and the code needed to reproduce them.

    Regards,
    -- Hauke D