全部博文(279)
分类:
2008-01-22 15:58:46
#!/usr/bin/perl
use Array::Compare;
$comp = Array::Compare->;new(WhiteSpace =>; 1);
$cmd = "top -n1 | head -4";
@a1 = `$cmd`;
@a2 = `$cmd`;
@result = $comp->;full_compare(\@a1, \@a2);
foreach(@result)
{
print $_ + 1, "th line:\n";
print ">; $a1[$_]>; $a2[$_]";
print "-----\n";
}
exit 0;