[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

raeburn raeburn@source.lon-capa.org
Sun, 21 Dec 2008 19:03:10 -0000


raeburn		Sun Dec 21 19:03:10 2008 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - \Q escape to avoid interpolating contents of $delthis as special characters in regexp. 
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.980 loncom/lonnet/perl/lonnet.pm:1.981
--- loncom/lonnet/perl/lonnet.pm:1.980	Fri Dec 19 17:14:08 2008
+++ loncom/lonnet/perl/lonnet.pm	Sun Dec 21 19:03:10 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.980 2008/12/19 17:14:08 raeburn Exp $
+# $Id: lonnet.pm,v 1.981 2008/12/21 19:03:10 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -525,7 +525,7 @@
 	tie(my %disk_env,'GDBM_File',$env{'user.environment'},
 	    (&GDBM_WRITER()|&GDBM_NOLOCK()),0640)) {
 	foreach my $key (keys(%disk_env)) {
-	    if ($key=~/^$delthis/) { 
+	    if ($key=~/^\Q$delthis\E/) { 
 		delete($env{$key});
 		delete($disk_env{$key});
 	    }