Skip to content

Instantly share code, notes, and snippets.

@nkwhr
Created April 2, 2014 16:12
Show Gist options
  • Save nkwhr/9937313 to your computer and use it in GitHub Desktop.
Save nkwhr/9937313 to your computer and use it in GitHub Desktop.
paste diff
#!perl
use sane;
use Text::Diff;
my ($a, $b) = '';
system 'clear';
say 'Paste A (Ctrl-D to end)';
while (my $line = <STDIN>) {
$a .= $line;
}
system 'clear';
say 'Paste B (Ctrl-D to end)';
while (my $line = <STDIN>) {
$b .= $line;
}
system 'clear';
say diff(\$a, \$b);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment