=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.
=head1 ENVIRONMENT
-S2p uses no environment variables.
+s2p uses no environment variables.
=head1 AUTHOR
=head1 SEE ALSO
perl The perl compiler/interpreter
-
+
a2p awk to perl translator
=head1 DIAGNOSTICS
: if ($atext) { chop $atext; print $atext; $atext = ''; }
: #endif
EOT
+}
print BODY &q(<<'EOT');
: }
EOT
-}
unless ($debug) {
substr($_,$i-1,1) = '$';
}
}
+ elsif ($c eq '@') {
+ substr($_, $i, 0) = '\\';
+ $i++;
+ $len++;
+ }
elsif ($c eq '&' && $repl) {
substr($_, $i, 0) = '$';
$i++;
}
if (/^H/) {
- $_ = '$hold .= "\n"; $hold .= $_;';
+ $_ = '$hold .= "\n", $hold .= $_;';
next;
}
}
if (/^G/) {
- $_ = '$_ .= "\n"; $_ .= $hold;';
+ $_ = '$_ .= "\n", $_ .= $hold;';
next;
}
}
}
$addr =~ s/\t/\\t/g;
+ $addr =~ s/\@/\\@/g;
&simplify($addr);
$addr;
}