#!/usr/bin/perl

while (@ARGV) {
	$file=shift(@ARGV);
	open (FH, "$file");
	@lines=(<FH>);
	close (FH);

	print "$file : ";

	if (@lines[0] =~ m/\/usr\/bin\/perl/){
	print "path is OK.\n";}
	
	else{
	print "path has been fixed.\n";
	foreach (@lines){
		s/\/usr\/local\/bin\/perl/\/usr\/bin\/perl/;
		last;
		}
	}

	open (OUT,">$file");
	foreach(@lines){
		print OUT "$_";
		}
	close (OUT);
}
