#!/usr/local/bin/perl use warnings; use strict; use File::Copy; my $cmd = "gcc -x c++ -c $ARGV[0] 2>&1"; #print STDERR "$cmd\n"; open(FH, "$cmd |") or die; undef $/; my $got = ; #print STDERR "got: $got\n"; #print STDERR length($got); if ($got =~ /internal error/) { exit 0; } else { exit 1; }