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