#!/usr/bin/perl open(GOODFILE,"; close(GOODFILE); open(CHECKFILE,"; close(CHECKFILE); chomp(@GOOD_LINES); chomp(@CHECKLINES); foreach $GOODLINE (@GOOD_LINES) { foreach $CHECKLINE (@CHECKLINES) { if ( $GOODLINE eq $CHECKLINE ) { open (TEMPFILE, '>>temp.txt'); print TEMPFILE $GOODLINE."\n"; close (TEMPFILE); } } } system("/usr/bin/diff /good.txt /temp.txt > /dev/null"); if ( $? == 0 ) { print "Config OK!"."\n"; } else { print "Config nicht OK!"."\n"; }