c = utf8_to_uvchr((U8*)PL_reginput, NULL);
else
c = UCHARAT(PL_reginput);
+ /* If it could work, try it. */
+ if (c == c1 || c == c2)
+ {
+ TRYPAREN(paren, n, PL_reginput);
+ REGCP_UNWIND(lastcp);
+ }
}
/* If it could work, try it. */
- if (c1 == -1000 || c == c1 || c == c2)
+ else if (c1 == -1000)
{
TRYPAREN(paren, n, PL_reginput);
REGCP_UNWIND(lastcp);
($^O eq "MSWin32") ? "cd" : (grep { -x && -f } map { "$_/pwd" }
split m/$Config{path_sep}/, $ENV{PATH})[0];
+if ($^O eq 'VMS') { $pwd_cmd = 'SHOW DEFAULT'; }
+
if (defined $pwd_cmd) {
chomp(my $start = `$pwd_cmd`);
# Win32's cd returns native C:\ style
$start =~ s,\\,/,g if $^O eq 'MSWin32';
+ # DCL SHOW DEFAULT has leading spaces
+ $start =~ s/^\s+// if $^O eq 'VMS';
if ($?) {
for (3..6) {
print "ok $_ # Skip: '$pwd_cmd' failed\n";
my $fastcwd = fastcwd;
my $fastgetcwd = fastgetcwd;
my $want = "t/pteerslt/path/to/a/dir";
+# This checked out OK on ODS-2 and ODS-5:
+$want = "T\.PTEERSLT\.PATH\.TO\.A\.DIR\]";
print +($cwd =~ m|$want$| ? "" : "not "), "ok 7\n";
print +($getcwd =~ m|$want$| ? "" : "not "), "ok 8\n";
print +($fastcwd =~ m|$want$| ? "" : "not "), "ok 9\n";
print "#$ENV{PWD}\n";
Cwd::chdir ".."; rmdir "pteerslt";
print "#$ENV{PWD}\n";
-print +($ENV{PWD} =~ m|\bt$| ? "" : "not "), "ok 12\n";
+if ($^O eq 'VMS') {
+ # This checked out OK on ODS-2 and ODS-5:
+ print +($ENV{PWD} =~ m|\bT\]$| ? "" : "not "), "ok 12\n";
+}
+else {
+ print +($ENV{PWD} =~ m|\bt$| ? "" : "not "), "ok 12\n";
+}
if ($Config{d_symlink}) {
my @dirs = split " " => $Config{libpth};