{
    "content": [
        {
            "type": "text",
            "text": "# File::Compare (perldoc)\n\n**Summary:** File::Compare - Compare files or filehandles\n\n**Synopsis:** use File::Compare;\nif (compare(\"file1\",\"file2\") == 0) {\nprint \"They're equal\\n\";\n}\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (6 lines)\n- **DESCRIPTION** (17 lines)\n- **RETURN** (3 lines)\n- **AUTHOR** (3 lines)\n\n## Full Content\n\n### NAME\n\nFile::Compare - Compare files or filehandles\n\n### SYNOPSIS\n\nuse File::Compare;\n\nif (compare(\"file1\",\"file2\") == 0) {\nprint \"They're equal\\n\";\n}\n\n### DESCRIPTION\n\nThe File::Compare::compare function compares the contents of two sources, each of which can be a\nfile or a file handle. It is exported from File::Compare by default.\n\nFile::Compare::cmp is a synonym for File::Compare::compare. It is exported from File::Compare\nonly by request.\n\nFile::Compare::comparetext does a line by line comparison of the two files. It stops as soon as\na difference is detected. comparetext() accepts an optional third argument: This must be a CODE\nreference to a line comparison function, which returns 0 when both lines are considered equal.\nFor example:\n\ncomparetext($file1, $file2)\n\nis basically equivalent to\n\ncomparetext($file1, $file2, sub {$[0] ne $[1]} )\n\n### RETURN\n\nFile::Compare::compare and its sibling functions return 0 if the files are equal, 1 if the files\nare unequal, or -1 if an error was encountered.\n\n### AUTHOR\n\nFile::Compare was written by Nick Ing-Simmons. Its original documentation was written by Chip\nSalzenberg.\n\n"
        }
    ],
    "structuredContent": {
        "command": "File::Compare",
        "section": "",
        "mode": "perldoc",
        "summary": "File::Compare - Compare files or filehandles",
        "synopsis": "use File::Compare;\nif (compare(\"file1\",\"file2\") == 0) {\nprint \"They're equal\\n\";\n}",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "RETURN",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "File::Compare - Compare files or filehandles\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use File::Compare;\n\nif (compare(\"file1\",\"file2\") == 0) {\nprint \"They're equal\\n\";\n}\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The File::Compare::compare function compares the contents of two sources, each of which can be a\nfile or a file handle. It is exported from File::Compare by default.\n\nFile::Compare::cmp is a synonym for File::Compare::compare. It is exported from File::Compare\nonly by request.\n\nFile::Compare::comparetext does a line by line comparison of the two files. It stops as soon as\na difference is detected. comparetext() accepts an optional third argument: This must be a CODE\nreference to a line comparison function, which returns 0 when both lines are considered equal.\nFor example:\n\ncomparetext($file1, $file2)\n\nis basically equivalent to\n\ncomparetext($file1, $file2, sub {$[0] ne $[1]} )\n",
                "subsections": []
            },
            "RETURN": {
                "content": "File::Compare::compare and its sibling functions return 0 if the files are equal, 1 if the files\nare unequal, or -1 if an error was encountered.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "File::Compare was written by Nick Ing-Simmons. Its original documentation was written by Chip\nSalzenberg.\n",
                "subsections": []
            }
        }
    }
}