test.com shebang handling (was Re: VMS@14369)
Craig A. Berry [Tue, 22 Jan 2002 22:14:26 +0000 (16:14 -0600)]
Message-Id: <a05101000b873de9cf801@[172.16.52.1]>

p4raw-id: //depot/perl@14380

vms/test.com

index 8c4d840..bd96543 100644 (file)
@@ -102,10 +102,8 @@ while ($test = shift) {
        open(script,"$test") || die "Can't run $test.\n";
        $_ = <script>;
        close(script);
-       if (/#!..perl(.*)/) {
-           $switch = $1;
-           # Add "" to protect uppercase switches on command line
-           $switch =~ s/-(\S*[A-Z]\S*)/"-$1"/g;
+       if (/#!.*\bperl.*-\w*([tT])/) {
+           $switch = qq{"-$1"};
        } else {
            $switch = '';
        }