Cool File & Directory Modules Text::Diff 66 of 69 : prev | index | next

Text::Diff

Examples

    use Text::Diff;
    ## Mix and match filenames, strings, file handles, producer subs,
    ## or arrays of records; returns diff in a string.
    ## WARNING: can return B<large> diffs for large files.
    my $diff = diff "file1.txt", "file2.txt", { STYLE => "Context" };
    my $diff = diff \$string1,   \$string2,   \%options;
    my $diff = diff \*FH1,       \*FH2,       { OUTPUT => \*FH3 };
    my $diff = diff \&reader1,   \&reader2;
    my $diff = diff \@records1,  \@records2;
    ## May also mix input types:
    my $diff = diff \@records1,  "file_B.txt";

© 2003 Barbie - barbie@missbarbell.co.uk contents http://birmingham.pm.org/