Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perldoc documentation 2

Status
Not open for further replies.

hmerrill

Programmer
Dec 4, 2000
473
0
0
US
I'm pretty new to this list, but I've seen some fairly basic questions that could be answered by using the documentation that comes with Perl - it's called "perldoc"s. For example, doing "perldoc perl" displays this:

PERL(1) User Contributed Perl Documentation PERL(1)


NAME
perl - Practical Extraction and Report Language

SYNOPSIS
perl [ -sTuU ] [ -hv ] [ -V[:configvar] ]
[ -cw ] [ -d[:debugger] ] [ -D[number/list] ]
[ -pna ] [ -Fpattern ] [ -l[octal] ] [ -0[octal] ]
[ -Idir ] [ -m[-]module ] [ -M[-]'module...' ]
[ -P ] [ -S ] [ -x[dir] ]
[ -i[extension] ]
[ -e 'command' ] [ -- ] [ programfile ] [ argument ]...

For ease of access, the Perl manual has been split up into
several sections:

perl Perl overview (this section)
perldelta Perl changes since previous version
perl5005delta Perl changes in version 5.005
perl5004delta Perl changes in version 5.004
perlfaq Perl frequently asked questions
perltoc Perl documentation table of contents

perldata Perl data structures
perlsyn Perl syntax
perlop Perl operators and precedence
perlre Perl regular expressions
perlrun Perl execution and options
perlfunc Perl builtin functions
perlopentut Perl open() tutorial
perlvar Perl predefined variables
perlsub Perl subroutines
perlmod Perl modules: how they work
perlmodlib Perl modules: how to write and use
perlmodinstall Perl modules: how to install from CPAN
perlform Perl formats
perlunicode Perl unicode support
perllocale Perl locale support

-----------------------------------
This is just a small part of the "perldoc perl" output, just to show you how to get started.

If I wanted to learn more about perl operators, I would do "perldoc perlop".

To look up specific search strings in the perldocs, use the "-q" operator - if I wanted to know how to send mail with perl, I could do "perldoc -q mail", and it would list for me any of the "mail" topics that are in the perldocs.

To look up specific perl functions, use the "-f" operator - if I want to know how to use the perl "split" function, do "perldoc -f split", and it will describe how to use split.

I'm a Linux user, and am not sure how to get the perldocs on Windows - if the method of getting perldocs on Windows is different, maybe someone who knows how to get perldocs on Windows could reply.

You can start with "perldoc perldoc", or "perldoc perl" as I did above. Hope this saves some time and effort. I went quite a long time learning Perl before I ever became aware of the perldocs - now I use them every day. HTH.

Hardy Merrill
Mission Critical Linux, Inc.
 
To get PerlDoc for windows users, go to
You can either view it online from the site

or

if you have downloaded perl 522 upwards for win32, its in a the perl folder: perl\html\lib\pod

its got all the basic info and links.

ratz
 
Also try for an online version of the Perl documentation.

Another method I like to use when I can't find a solution is to search for the solution in C. Arguably, more programmers use C than Perl. And Perl is written in C, and very compatible with it. So, if someone can give you a C solution to your Perl problem, it doesn't take much to port it to Perl.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top