#!/usr/bin/perl

$student = $ARGV[0];

opendir(HANDINS, "./");

system("cat header.txt > $student-grades.txt");

open(GRADES,">>","$student-grades.txt");

@subdirs = readdir(HANDINS);

foreach $subdir (@subdirs)
{
	if(!($subdir =~ /.*\..*/))
	{
		print GRADES "$subdir\n";
		system("cat $subdir/$student/comments.txt >> $student-grades.txt");
		print GRADES "\n\n";
	}
}
