--- loncom/debugging_tools/modify_config_files.pl 2004/08/09 21:05:40 1.1 +++ loncom/debugging_tools/modify_config_files.pl 2004/08/10 20:26:02 1.2 @@ -2,7 +2,7 @@ # # The LearningOnline Network # -# $Id: modify_config_files.pl,v 1.1 2004/08/09 21:05:40 matthew Exp $ +# $Id: modify_config_files.pl,v 1.2 2004/08/10 20:26:02 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -259,7 +259,7 @@ sub modify_config_file { unshift(@$target,$newline); } else { # No need to put things after a blank line. - if ($target->[-1] =~ /^\s*$/) { + if (defined($target->[-1]) && $target->[-1] =~ /^\s*$/) { $target->[-1] = $newline; } else { push(@$target,$newline);