Skip to content

Instantly share code, notes, and snippets.

@motemen
Created May 7, 2009 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save motemen/108046 to your computer and use it in GitHub Desktop.
Save motemen/108046 to your computer and use it in GitHub Desktop.
#!perl
use strict;
use warnings;
use File::Temp;
my $basename = shift;
my $output = `cat $basename.in | perl $basename.pl`;
my $fh = File::Temp->new;
print $fh $output;
exec "diff -u $basename.out " . $fh->filename;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment