This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
s2p fix for VMS
[perl5.git] / x2p / s2p.PL
index 9a084f9..9b62caa 100644 (file)
@@ -43,7 +43,7 @@ $Config{perlpath}
 
 print OUT <<'!NO!SUBS!';
 
-$0 =~ s/^.*?(\w+)$/$1/;
+$0 =~ s/^.*?(\w+)[\.\w]*$/$1/;
 
 # (p)sed - a stream editor
 # History:  Aug 12 2000: Original version.
@@ -1795,7 +1795,7 @@ if( $doGenerate ){
 #!$perlpath -w
 eval 'exec $perlpath -S \$0 \${1+"\$@"}'
   if 0;
-\$0 =~ s/^.*?(\\w+)\$/\$1/;
+\$0 =~ s/^.*?(\\w+)\[\\.\\w+\]*\$/\$1/;
 
 use strict;
 use Symbol;