diff -ru perl-5.8.1-RC5.orig/configure.com perl-5.8.1-RC5/configure.com
--- perl-5.8.1-RC5.orig/configure.com	2003-09-02 09:39:18.000000000 -0400
+++ perl-5.8.1-RC5/configure.com	2003-09-24 11:26:32.000000000 -0400
@@ -6217,7 +6217,8 @@
      if ($extdir =~ /^vms/i) { $extdir =~ s/vms/.vms.ext/i; }
      else                    { $extdir = ".ext.$extdir";   }
      ($ENV{'extdir'} = "[$extdir]");
-     ($ENV{'up'} = ('-') x ($extdir =~ tr/././));
+     my @d = split(  /(?<!\^)\./, $extdir );
+     ($ENV{'up'} = ('-') x ($#d));
 $    eod
 $    Set Default &extdir
 $    redesc = 0
diff -ru perl-5.8.1-RC5.orig/vms/ext/Filespec.pm perl-5.8.1-RC5/vms/ext/Filespec.pm
--- perl-5.8.1-RC5.orig/vms/ext/Filespec.pm	2003-09-18 05:21:59.000000000 -0400
+++ perl-5.8.1-RC5/vms/ext/Filespec.pm	2003-09-24 11:26:51.000000000 -0400
@@ -254,7 +254,7 @@
     $fspec = rmsexpand($fspec,'_N_O_T_:[_R_E_A_L_]');
     $fspec =~ s/.*_N_O_T_:(?:\[_R_E_A_L_\])?//;
     my($dev,$dir,$base) = $fspec =~ m#([^:<\[]*):?[<\[](.*)[>\]](.*)#;
-    my(@dirs) = split(m#\.#,$dir);
+    my(@dirs) = split(m#(?<!\^)\.#,$dir);
     if ($dirs[0] && $dirs[0] =~ /^-/) {
       my($steps) = shift @dirs;
       for (1..length($steps)) { unshift @dirs, '..'; }
diff -ru perl-5.8.1-RC5.orig/vms/vms.c perl-5.8.1-RC5/vms/vms.c
--- perl-5.8.1-RC5.orig/vms/vms.c	2003-09-02 09:42:03.000000000 -0400
+++ perl-5.8.1-RC5/vms/vms.c	2003-09-24 11:34:56.000000000 -0400
@@ -3745,6 +3745,12 @@
     else if (*cp2 == ']' || *cp2 == '>') {
       if (*(cp1-1) != '/') *(cp1++) = '/'; /* Don't double after ellipsis */
     }
+    else if (*cp2 == '^' && *(cp2+1) == '.') {
+      /* ODS-5 under "set process/parse=extend" uses ^. to escape periods in names */
+      *(cp1++) = '^';
+      *(cp1++) = '.';
+      cp2++;
+    }
     else if (*cp2 == '.') {
       *(cp1++) = '/';
       if (*(cp2+1) == ']' || *(cp2+1) == '>') {
@@ -3910,8 +3916,18 @@
     }
     else {
       if (!infront && *(cp1-1) == '-')  *(cp1++) = '.';
-      if (*cp2 == '.')      *(cp1++) = '_';
-      else                  *(cp1++) =  *cp2;
+      if ( *(cp2) == '^' && *(cp2+1) == '.' ) {
+        /* ODS-5 under "set process/parse=extend" uses ^. to escape periods in names */
+	*(cp1++) = '^';
+	*(cp1++) = '.';
+	cp2++;
+      }
+      else if (*cp2 == '.') {
+	*(cp1++) = '_';
+      }
+      else {
+        *(cp1++) =  *cp2;
+      }
       infront = 1;
     }
   }
