1PERLUTIL(1)            Perl Programmers Reference Guide            PERLUTIL(1)
2
3
4

NAME

6       perlutil - utilities packaged with the Perl distribution
7

DESCRIPTION

9       Along with the Perl interpreter itself, the Perl distribution installs
10       a range of utilities on your system. There are also several utilities
11       which are used by the Perl distribution itself as part of the install
12       process. This document exists to list all of these utilities, explain
13       what they are for and provide pointers to each module's documentation,
14       if appropriate.
15
16       DOCUMENTATION
17
18       perldoc
19          The main interface to Perl's documentation is "perldoc", although if
20          you're reading this, it's more than likely that you've already found
21          it. perldoc will extract and format the documentation from any file
22          in the current directory, any Perl module installed on the system,
23          or any of the standard documentation pages, such as this one. Use
24          "perldoc <name>" to get information on any of the utilities
25          described in this document.
26
27       pod2man and pod2text
28          If it's run from a terminal, perldoc will usually call pod2man to
29          translate POD (Plain Old Documentation - see perlpod for an explana‐
30          tion) into a manpage, and then run man to display it; if man isn't
31          available, pod2text will be used instead and the output piped
32          through your favourite pager.
33
34       pod2html and pod2latex
35          As well as these two, there are two other converters: pod2html will
36          produce HTML pages from POD, and pod2latex, which produces LaTeX
37          files.
38
39       pod2usage
40          If you just want to know how to use the utilities described here,
41          pod2usage will just extract the "USAGE" section; some of the utili‐
42          ties will automatically call pod2usage on themselves when you call
43          them with "-help".
44
45       podselect
46          pod2usage is a special case of podselect, a utility to extract named
47          sections from documents written in POD. For instance, while utili‐
48          ties have "USAGE" sections, Perl modules usually have "SYNOPSIS"
49          sections: "podselect -s "SYNOPSIS" ..." will extract this section
50          for a given file.
51
52       podchecker
53          If you're writing your own documentation in POD, the podchecker
54          utility will look for errors in your markup.
55
56       splain
57          splain is an interface to perldiag - paste in your error message to
58          it, and it'll explain it for you.
59
60       roffitall
61          The "roffitall" utility is not installed on your system but lives in
62          the pod/ directory of your Perl source kit; it converts all the doc‐
63          umentation from the distribution to *roff format, and produces a
64          typeset PostScript or text file of the whole lot.
65
66       CONVERTORS
67
68       To help you convert legacy programs to Perl, we've included three con‐
69       version filters:
70
71       a2p
72          a2p converts awk scripts to Perl programs; for example, "a2p -F:" on
73          the simple awk script "{print $2}" will produce a Perl program based
74          around this code:
75
76              while (<>) {
77                  ($Fld1,$Fld2) = split(/[:\n]/, $_, 9999);
78                  print $Fld2;
79              }
80
81       s2p
82          Similarly, s2p converts sed scripts to Perl programs. s2p run on
83          "s/foo/bar" will produce a Perl program based around this:
84
85              while (<>) {
86                  chomp;
87                  s/foo/bar/g;
88                  print if $printit;
89              }
90
91       find2perl
92          Finally, find2perl translates "find" commands to Perl equivalents
93          which use the File::Find module. As an example, "find2perl . -user
94          root -perm 4000 -print" produces the following callback subroutine
95          for "File::Find":
96
97              sub wanted {
98                  my ($dev,$ino,$mode,$nlink,$uid,$gid);
99                  (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &&
100                  $uid == $uid{'root'}) &&
101                  (($mode & 0777) == 04000);
102                  print("$name\n");
103              }
104
105       As well as these filters for converting other languages, the pl2pm
106       utility will help you convert old-style Perl 4 libraries to new-style
107       Perl5 modules.
108
109       Administration
110
111       libnetcfg
112          To display and change the libnet configuration run the libnetcfg
113          command.
114
115       Development
116
117       There are a set of utilities which help you in developing Perl pro‐
118       grams, and in particular, extending Perl with C.
119
120       perlbug
121          perlbug is the recommended way to report bugs in the perl inter‐
122          preter itself or any of the standard library modules back to the
123          developers; please read through the documentation for perlbug thor‐
124          oughly before using it to submit a bug report.
125
126       h2ph
127          Back before Perl had the XS system for connecting with C libraries,
128          programmers used to get library constants by reading through the C
129          header files. You may still see "require 'syscall.ph'" or similar
130          around - the .ph file should be created by running h2ph on the cor‐
131          responding .h file. See the h2ph documentation for more on how to
132          convert a whole bunch of header files at once.
133
134       c2ph and pstruct
135          c2ph and pstruct, which are actually the same program but behave
136          differently depending on how they are called, provide another way of
137          getting at C with Perl - they'll convert C structures and union dec‐
138          larations to Perl code. This is deprecated in favour of h2xs these
139          days.
140
141       h2xs
142          h2xs converts C header files into XS modules, and will try and write
143          as much glue between C libraries and Perl modules as it can. It's
144          also very useful for creating skeletons of pure Perl modules.
145
146       dprofpp
147          Perl comes with a profiler, the Devel::DProf module. The dprofpp
148          utility analyzes the output of this profiler and tells you which
149          subroutines are taking up the most run time. See Devel::DProf for
150          more information.
151
152       perlcc
153          perlcc is the interface to the experimental Perl compiler suite.
154
155       SEE ALSO
156
157       perldoc, pod2man, perlpod, pod2html, pod2usage, podselect, podchecker,
158       splain, perldiag, roffitall, a2p, s2p, find2perl, File::Find, pl2pm,
159       perlbug, h2ph, c2ph, h2xs, dprofpp, Devel::DProf, perlcc
160
161
162
163perl v5.8.8                       2006-01-07                       PERLUTIL(1)
Impressum