#!/usr/bin/perl use strict; if ($#ARGV != 0) { print("Correct command usage: \n"); print(" perl buildTexxml.pl all\n"); print("Or \n"); print(" perl buildTexxml.pl section\n"); } my $option = $ARGV[0]; my @section = `cat section_order.txt`; chomp(@section); if ($option eq 'all') { my $section_list; foreach my $section (@section) { $section_list .= 'sections/'.$section.' '; } system("cat sections/start.texxml $section_list sections/end.texxml > course.manual.texxml"); } if ($option eq 'section') { print("Choose from the following manual sections:\n"); my $num=0; foreach my $section (@section) { print("$num - $section\n"); $num++; } $num--; print("Enter a number 0 - $num for the section you want to print: "); my $selection=; chomp($selection); if ($selection < 0 || $selection > $#section) { print("Invalid selection ($selection)\n"); exit(1); } print("builing section $section[$selection]\n"); system("cat sections/start.texxml sections/$section[$selection] sections/end.texxml > section.manual.texxml"); } 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.