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