.rn '' }` ''' $Header: s2p.man,v 1.0 87/12/18 17:37:16 root Exp $ ''' ''' $Log: s2p.man,v $ ''' Revision 1.0 87/12/18 17:37:16 root ''' Initial revision ''' ''' .de Sh .br .ne 5 .PP \fB\\$1\fR .PP .. .de Sp .if t .sp .5v .if n .sp .. .de Ip .br .ie \\n.$>=3 .ne \\$3 .el .ne 3 .IP "\\$1" \\$2 .. ''' ''' Set up \*(-- to give an unbreakable dash; ''' string Tr holds user defined translation string. ''' Bell System Logo is used as a dummy character. ''' .tr \(bs-|\(bv\*(Tr .ie n \{\ .ds -- \(bs- .if (\n(.H=4u)&(1m=24u) .ds -- \(bs\h'-12u'\(bs\h'-12u'-\" diablo 10 pitch .if (\n(.H=4u)&(1m=20u) .ds -- \(bs\h'-12u'\(bs\h'-8u'-\" diablo 12 pitch .ds L" "" .ds R" "" .ds L' ' .ds R' ' 'br\} .el\{\ .ds -- \(em\| .tr \*(Tr .ds L" `` .ds R" '' .ds L' ` .ds R' ' 'br\} .TH S2P 1 NEW .SH NAME s2p - Sed to Perl translator .SH SYNOPSIS .B s2p [options] filename .SH DESCRIPTION .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. .Sh "Options" Options include: .TP 5 .B \-D sets debugging flags. .TP 5 .B \-n specifies that this sed script was always invoked with a sed -n. Otherwise a switch parser is prepended to the front of the script. .TP 5 .B \-p specifies that this sed script was never invoked with a sed -n. Otherwise a switch parser is prepended to the front of the script. .Sh "Considerations" The perl script produced looks very sed-ish, and there may very well be better ways to express what you want to do in perl. For instance, s2p does not make any use of the split operator, but you might want to. .PP The perl script you end up with may be either faster or slower than the original sed script. If you're only interested in speed you'll just have to try it both ways. Of course, if you want to do something sed doesn't do, you have no choice. .SH ENVIRONMENT S2p uses no environment variables. .SH AUTHOR Larry Wall .SH FILES .SH SEE ALSO perl The perl compiler/interpreter .br a2p awk to perl translator .SH DIAGNOSTICS .SH BUGS .rn }` ''