diff options
author | markm <markm@FreeBSD.org> | 2000-06-25 11:04:01 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2000-06-25 11:04:01 +0000 |
commit | 2618fad5bbb2d0182eb31ed805c41b543c513940 (patch) | |
tree | 52ba93338b13aefd02a0055304a9eccfa0e049f5 /contrib/perl5/x2p/s2p.PL | |
parent | 77644ee620b6a79cf8c538abaf7cd301a875528d (diff) | |
download | FreeBSD-src-2618fad5bbb2d0182eb31ed805c41b543c513940.zip FreeBSD-src-2618fad5bbb2d0182eb31ed805c41b543c513940.tar.gz |
Vendor import of Perl 5.006
Diffstat (limited to 'contrib/perl5/x2p/s2p.PL')
-rw-r--r-- | contrib/perl5/x2p/s2p.PL | 14 |
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; } |