Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Diff colorizer
#!/usr/bin/perl -n
use Term::ANSIColor;
print colored( $_, 'red' ) and next if /^</;
print colored( $_, 'green' ) and next if /^>/;
print colored( $_, 'bold blue' ) and next if /^[\d,]+[acd][\d,]+$/;
=head1 NAME
Diff Colorizer
Colorize output of diff: left parts becomes red, right ones becomes green and line numbers becomes bold blue
=head1 AUTHOR
Alexander Sapozhnikov
L<< >>
L<< E<lt>shoorick@cpan.orgE<gt> >>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.