perl 3.0 patch #4 Patch #2 continued
[p5sagit/p5-mst-13.2.git] / x2p / s2p.man
1 .rn '' }`
2 ''' $Header: s2p.man,v 3.0 89/10/18 15:35:09 lwall Locked $
3 ''' 
4 ''' $Log:       s2p.man,v $
5 ''' Revision 3.0  89/10/18  15:35:09  lwall
6 ''' 3.0 baseline
7 ''' 
8 ''' Revision 2.0  88/06/05  00:15:59  root
9 ''' Baseline version 2.0.
10 ''' 
11 ''' 
12 .de Sh
13 .br
14 .ne 5
15 .PP
16 \fB\\$1\fR
17 .PP
18 ..
19 .de Sp
20 .if t .sp .5v
21 .if n .sp
22 ..
23 .de Ip
24 .br
25 .ie \\n.$>=3 .ne \\$3
26 .el .ne 3
27 .IP "\\$1" \\$2
28 ..
29 '''
30 '''     Set up \*(-- to give an unbreakable dash;
31 '''     string Tr holds user defined translation string.
32 '''     Bell System Logo is used as a dummy character.
33 '''
34 .tr \(*W-|\(bv\*(Tr
35 .ie n \{\
36 .ds -- \(*W-
37 .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38 .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39 .ds L" ""
40 .ds R" ""
41 .ds L' '
42 .ds R' '
43 'br\}
44 .el\{\
45 .ds -- \(em\|
46 .tr \*(Tr
47 .ds L" ``
48 .ds R" ''
49 .ds L' `
50 .ds R' '
51 'br\}
52 .TH S2P 1 NEW
53 .SH NAME
54 s2p - Sed to Perl translator
55 .SH SYNOPSIS
56 .B s2p [options] filename
57 .SH DESCRIPTION
58 .I S2p
59 takes a sed script specified on the command line (or from standard input)
60 and produces a comparable
61 .I perl
62 script on the standard output.
63 .Sh "Options"
64 Options include:
65 .TP 5
66 .B \-D<number>
67 sets debugging flags.
68 .TP 5
69 .B \-n
70 specifies that this sed script was always invoked with a sed -n.
71 Otherwise a switch parser is prepended to the front of the script.
72 .TP 5
73 .B \-p
74 specifies that this sed script was never invoked with a sed -n.
75 Otherwise a switch parser is prepended to the front of the script.
76 .Sh "Considerations"
77 The perl script produced looks very sed-ish, and there may very well be
78 better ways to express what you want to do in perl.
79 For instance, s2p does not make any use of the split operator, but you might
80 want to.
81 .PP
82 The perl script you end up with may be either faster or slower than the original
83 sed script.
84 If you're only interested in speed you'll just have to try it both ways.
85 Of course, if you want to do something sed doesn't do, you have no choice.
86 .SH ENVIRONMENT
87 S2p uses no environment variables.
88 .SH AUTHOR
89 Larry Wall <lwall@jpl-devvax.Jpl.Nasa.Gov>
90 .SH FILES
91 .SH SEE ALSO
92 perl    The perl compiler/interpreter
93 .br
94 a2p     awk to perl translator
95 .SH DIAGNOSTICS
96 .SH BUGS
97 .rn }` ''