Habe fehlermeldung und komme nicht weite

robaer1982

Mitglied
Halle habe ein perscript das ich ausführen möchte bekomme aber eine fehlermeldung

ERROR 500 "Premature end of script header"

hier der cod
Code:
#!/usr/bin/perl

# This script will search through all the *.int files and generate a 
# list of mutators and output to the .mutators_available file

# Set up the constant variables that we will be using throughout the script
$UT_SYS_DIR="/usr/games/ut-server/System";	# Assuming current directory
$OUTPUT_FILE_NAME=".mutators_available";

open (OUT, ">/var/tmp/$OUTPUT_FILE_NAME") or die "Cannot open $OUTPUT_FILE_NAME for output\n";

print OUT "--checklist Mutators 20 50 10 ";
# First get a list of all the *.int files in the UT System directory
opendir DIRECTORY, $UT_SYS_DIR or die "opendir FAILED on $UT_SYS_DIR\n";
@IntFiles = grep /.?.[Ii][Nn][Tt]/, readdir DIRECTORY;
closedir DIRECTORY;

# Open each file and parse out all the Mutators in each file
foreach $CurrentFile (@IntFiles) {
	$FileIn = $UT_SYS_DIR . "\/" . $CurrentFile;
	open(IN, "<$FileIn") or die "Cannot open $FileIn for input\n";
	@Lines = <IN>;
	close IN;
	@Mutators = grep /MetaClass=Engine\.Mutator,/, @Lines;
	foreach $Line (@Mutators) {
		$Line =~ /Name=(.*?),Class/;
		print OUT "$1 '' OFF \\\n";
	}	# End loop through all lines in this file
} # End loop through all *.int files
close OUT;

habe shell zugriff
das script fäuft mit 775
 
Zuletzt bearbeitet:
Zurück