summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/x2p/s2p.PL
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/x2p/s2p.PL')
-rw-r--r--contrib/perl5/x2p/s2p.PL14
1 files changed, 10 insertions, 4 deletions
diff --git a/contrib/perl5/x2p/s2p.PL b/contrib/perl5/x2p/s2p.PL
index 463465d..4f7bf8c 100644
--- a/contrib/perl5/x2p/s2p.PL
+++ b/contrib/perl5/x2p/s2p.PL
@@ -51,7 +51,7 @@ B<s2p [options] filename>
=head1 DESCRIPTION
-I<S2p> takes a sed script specified on the command line (or from
+I<s2p> takes a sed script specified on the command line (or from
standard input) and produces a comparable I<perl> script on the
standard output.
@@ -93,7 +93,7 @@ $\ and chop.
=head1 ENVIRONMENT
-S2p uses no environment variables.
+s2p uses no environment variables.
=head1 AUTHOR
@@ -104,7 +104,7 @@ Larry Wall E<lt>F<larry@wall.org>E<gt>
=head1 SEE ALSO
perl The perl compiler/interpreter
-
+
a2p awk to perl translator
=head1 DIAGNOSTICS
@@ -339,11 +339,11 @@ if ($appendseen || $tseen || !$assumen) {
: if ($atext) { chop $atext; print $atext; $atext = ''; }
: #endif
EOT
+}
print BODY &q(<<'EOT');
: }
EOT
-}
unless ($debug) {
@@ -552,6 +552,11 @@ EOT
substr($_,$i-1,1) = '$';
}
}
+ elsif ($c eq '@') {
+ substr($_, $i, 0) = '\\';
+ $i++;
+ $len++;
+ }
elsif ($c eq '&' && $repl) {
substr($_, $i, 0) = '$';
$i++;
@@ -797,6 +802,7 @@ sub fetchpat {
}
}
$addr =~ s/\t/\\t/g;
+ $addr =~ s/\@/\\@/g;
&simplify($addr);
$addr;
}
OpenPOWER on IntegriCloud