perltoc - perl documentation table of contents
This page provides a brief table of contents for the rest
of the Perl documentation set. It is meant to be scanned
quickly or grepped through to locate the proper section
you're looking for.
perl - Practical Extraction and Report Language
SYNOPSIS
Overview
Tutorials
Reference Manual
Internals and C Language Interface
Miscellaneous
Language-Specific
Platform-Specific
DESCRIPTION
AVAILABILITY
ENVIRONMENT
AUTHOR
FILES
SEE ALSO
DIAGNOSTICS
BUGS
NOTES
perlintro -- a brief introduction and overview of Perl
DESCRIPTION
What is Perl?
Running Perl programs
Basic syntax overview
Perl variable types
Scalars, Arrays, Hashes
Variable scoping
Conditional and looping constructs
if, while, for, foreach
Builtin operators and functions
Arithmetic, Numeric comparison, String comparison,
Boolean logic, Miscellaneous
Files and I/O
Regular expressions
Simple matching, Simple substitution, More complex
regular expressions, Parentheses for capturing,
Other regexp features
Writing subroutines
OO Perl
Using Perl modules
AUTHOR
perlreftut - Mark's very short tutorial about references
DESCRIPTION
Who Needs Complicated Data Structures?
The Solution
Syntax
Making References
Using References
An Example
Arrow Rule
Solution
The Rest
Summary
Credits
Distribution Conditions
perldsc - Perl Data Structures Cookbook
DESCRIPTION
arrays of arrays, hashes of arrays, arrays of hashes,
hashes of hashes, more elaborate constructs
REFERENCES
COMMON MISTAKES
CAVEAT ON PRECEDENCE
WHY YOU SHOULD ALWAYS "use strict"
DEBUGGING
CODE EXAMPLES
ARRAYS OF ARRAYS
Declaration of an ARRAY OF ARRAYS
Generation of an ARRAY OF ARRAYS
Access and Printing of an ARRAY OF ARRAYS
HASHES OF ARRAYS
Declaration of a HASH OF ARRAYS
Generation of a HASH OF ARRAYS
Access and Printing of a HASH OF ARRAYS
ARRAYS OF HASHES
Declaration of an ARRAY OF HASHES
Generation of an ARRAY OF HASHES
Access and Printing of an ARRAY OF HASHES
HASHES OF HASHES
Declaration of a HASH OF HASHES
Generation of a HASH OF HASHES
Access and Printing of a HASH OF HASHES
MORE ELABORATE RECORDS
Declaration of MORE ELABORATE RECORDS
Declaration of a HASH OF COMPLEX RECORDS
Generation of a HASH OF COMPLEX RECORDS
Database Ties
SEE ALSO
AUTHOR
perllol - Manipulating Arrays of Arrays in Perl
DESCRIPTION
Declaration and Access of Arrays of Arrays
Growing Your Own
Access and Printing
Slices
SEE ALSO
AUTHOR
perlrequick - Perl regular expressions quick start
DESCRIPTION
The Guide
Simple word matching
Using character classes
Matching this or that
Grouping things and hierarchical matching
Extracting matches
Matching repetitions
More matching
Search and replace
The split operator
BUGS
SEE ALSO
AUTHOR AND COPYRIGHT
Acknowledgments
perlretut - Perl regular expressions tutorial
DESCRIPTION
Part 1: The basics
Simple word matching
Using character classes
Matching this or that
Grouping things and hierarchical matching
Extracting matches
Matching repetitions
Building a regexp
Using regular expressions in Perl
Part 2: Power tools
More on characters, strings, and character classes
Compiling and saving regular expressions
Embedding comments and modifiers in a regular expression
Non-capturing groupings
Looking ahead and looking behind
Using independent subexpressions to prevent backtracking
Conditional expressions
A bit of magic: executing Perl code in a regular
expression
Pragmas and debugging
BUGS
SEE ALSO
AUTHOR AND COPYRIGHT
Acknowledgments
perlboot - Beginner's Object-Oriented Tutorial
DESCRIPTION
If we could talk to the animals...
Introducing the method invocation arrow
Invoking a barnyard
The extra parameter of method invocation
Calling a second method to simplify things
Inheriting the windpipes
A few notes about @ISA
Overriding the methods
Starting the search from a different place
The SUPER way of doing things
Where we're at so far...
A horse is a horse, of course of course -- or is it?
Invoking an instance method
Accessing the instance data
How to build a horse
Inheriting the constructor
Making a method work with either classes or instances
Adding parameters to a method
More interesting instances
A horse of a different color
Summary
SEE ALSO
COPYRIGHT
perltoot - Tom's object-oriented tutorial for perl
DESCRIPTION
Creating a Class
Object Representation
Class Interface
Constructors and Instance Methods
Planning for the Future: Better Constructors
Destructors
Other Object Methods
Class Data
Accessing Class Data
Debugging Methods
Class Destructors
Documenting the Interface
Aggregation
Inheritance
Overridden Methods
Multiple Inheritance
UNIVERSAL: The Root of All Objects
Alternate Object Representations
Arrays as Objects
Closures as Objects
AUTOLOAD: Proxy Methods
Autoloaded Data Methods
Inherited Autoloaded Data Methods
Metaclassical Tools
Class::Struct
Data Members as Variables
NOTES
Object Terminology
SEE ALSO
AUTHOR AND COPYRIGHT
COPYRIGHT
Acknowledgments
perltooc - Tom's OO Tutorial for Class Data in Perl
DESCRIPTION
Class Data in a Can
Class Data as Package Variables
Putting All Your Eggs in One Basket
Inheritance Concerns
The Eponymous Meta-Object
Indirect References to Class Data
Monadic Classes
Translucent Attributes
Class Data as Lexical Variables
Privacy and Responsibility
File-Scoped Lexicals
More Inheritance Concerns
Locking the Door and Throwing Away the Key
Translucency Revisited
NOTES
SEE ALSO
AUTHOR AND COPYRIGHT
ACKNOWLEDGEMENTS
HISTORY
perlbot - Bag'o Object Tricks (the BOT)
DESCRIPTION
OO SCALING TIPS
INSTANCE VARIABLES
SCALAR INSTANCE VARIABLES
INSTANCE VARIABLE INHERITANCE
OBJECT RELATIONSHIPS
OVERRIDING SUPERCLASS METHODS
USING RELATIONSHIP WITH SDBM
THINKING OF CODE REUSE
CLASS CONTEXT AND THE OBJECT
INHERITING A CONSTRUCTOR
DELEGATION
SEE ALSO
perlstyle - Perl style guide
DESCRIPTION
perlcheat - Perl 5 Cheat Sheet
DESCRIPTION
The sheet
ACKNOWLEDGEMENTS
AUTHOR
SEE ALSO
perltrap - Perl traps for the unwary
DESCRIPTION
Awk Traps
C/C++ Traps
Sed Traps
Shell Traps
Perl Traps
Perl4 to Perl5 Traps
Discontinuance, Deprecation, and BugFix traps,
Parsing Traps, Numerical Traps, General data type
traps, Context Traps - scalar, list contexts,
Precedence Traps, General Regular Expression Traps
using s///, etc, Subroutine, Signal, Sorting
Traps, OS Traps, DBM Traps, Unclassified Traps
Discontinuance, Deprecation, and BugFix traps
Discontinuance, Deprecation, BugFix, Discontinuance,
Discontinuance, Discontinuance, BugFix, Discontinuance,
Discontinuance, BugFix, Discontinuance,
Deprecation, Discontinuance, Discontinuance
Parsing Traps
Parsing, Parsing, Parsing, Parsing, Parsing
Numerical Traps
Numerical, Numerical, Numerical, Bitwise string
ops
General data type traps
(Arrays), (Arrays), (Hashes), (Globs), (Globs),
(Scalar String), (Constants), (Scalars), (Variable
Suicide)
Context Traps - scalar, list contexts
(list context), (scalar context), (scalar context),
(list, builtin)
Precedence Traps
Precedence, Precedence, Precedence, Precedence,
Precedence, Precedence, Precedence
General Regular Expression Traps using s///, etc.
Regular Expression, Regular Expression, Regular
Expression, Regular Expression, Regular Expression,
Regular Expression, Regular Expression, Regular
Expression, Regular Expression
Subroutine, Signal, Sorting Traps
(Signals), (Sort Subroutine), warn() won't let you
specify a filehandle
OS Traps
(SysV), (SysV)
Interpolation Traps
Interpolation, Interpolation, Interpolation,
Interpolation, Interpolation, Interpolation,
Interpolation, Interpolation, Interpolation
DBM Traps
DBM, DBM
Unclassified Traps
"require"/"do" trap using returned value, "split"
on empty string with LIMIT specified
perldebtut - Perl debugging tutorial
DESCRIPTION
use strict
Looking at data and -w and v
help
Stepping through code
Placeholder for a, w, t, T
REGULAR EXPRESSIONS
OUTPUT TIPS
CGI
GUIs
SUMMARY
SEE ALSO
AUTHOR
CONTRIBUTORS
perlfaq - frequently asked questions about Perl ($Date:
2003/01/31 17:37:17 $)
DESCRIPTION
Where to get the perlfaq
How to contribute to the perlfaq
What will happen if you mail your Perl programming
problems to the authors
Credits
Author and Copyright Information
Bundled Distributions
Disclaimer
Table of Contents
perlfaq - this document, perlfaq1 - General Questions
About Perl, perlfaq2 - Obtaining and Learning about
Perl, perlfaq3 - Programming Tools, perlfaq4 - Data
Manipulation, perlfaq5 - Files and Formats, perlfaq6 -
Regular Expressions, perlfaq7 - General Perl Language
Issues, perlfaq8 - System Interaction, perlfaq9 - Networking
The Questions
perlfaq1: General Questions About Perl
perlfaq2: Obtaining and Learning about Perl
perlfaq3: Programming Tools
perlfaq4: Data Manipulation
perlfaq5: Files and Formats
perlfaq6: Regular Expressions
perlfaq7: General Perl Language Issues
perlfaq8: System Interaction
perlfaq9: Networking
perlfaq1 - General Questions About Perl ($Revision: 1.9 $,
$Date: 2003/07/09 15:47:28 $)
DESCRIPTION
What is Perl?
Who supports Perl? Who develops it? Why is it free?
Which version of Perl should I use?
What are perl4 and perl5?
What is Ponie?
What is perl6?
How stable is Perl?
Is Perl difficult to learn?
How does Perl compare with other languages like Java,
Python, REXX, Scheme, or Tcl?
Can I do [task] in Perl?
When shouldn't I program in Perl?
What's the difference between "perl" and "Perl"?
Is it a Perl program or a Perl script?
What is a JAPH?
Where can I get a list of Larry Wall witticisms?
How can I convince my sysadmin/supervisor/employees to
use ver- sion 5/5.6.1/Perl instead of some other language?
AUTHOR AND COPYRIGHT
perlfaq2 - Obtaining and Learning about Perl ($Revision:
1.9 $, $Date: 2004/08/09 18:10:16 $)
DESCRIPTION
What machines support Perl? Where do I get it?
How can I get a binary version of Perl?
I don't have a C compiler on my system. How can I
compile perl?
I copied the Perl binary from one machine to another,
but scripts don't work.
I grabbed the sources and tried to compile but
gdbm/dynamic load- ing/malloc/linking/... failed. How
do I make it work?
What modules and extensions are available for Perl?
What is CPAN? What does CPAN/src/... mean?
Is there an ISO or ANSI certified version of Perl?
Where can I get information on Perl?
What are the Perl newsgroups on Usenet? Where do I
post ques- tions?
Where should I post source code?
Perl Books
References, Tutorials, Task-Oriented, Special Topics
Perl in Magazines
Perl on the Net: FTP and WWW Access
What mailing lists are there for Perl?
Archives of comp.lang.perl.misc
Where can I buy a commercial version of Perl?
Where do I send bug reports?
What is perl.com? Perl Mongers? pm.org? perl.org?
cpan.org?
AUTHOR AND COPYRIGHT
perlfaq3 - Programming Tools ($Revision: 1.9 $, $Date:
2003/08/24 05:26:59 $)
DESCRIPTION
How do I do (anything)?
How can I use Perl interactively?
Is there a Perl shell?
How do I find which modules are installed on my system?
How do I debug my Perl programs?
How do I profile my Perl programs?
How do I cross-reference my Perl programs?
Is there a pretty-printer (formatter) for Perl?
Is there a ctags for Perl?
Is there an IDE or Windows Perl Editor?
Komodo, The Object System, Open Perl IDE, PerlBuilder,
visiPerl+, OptiPerl, GNU Emacs,
MicroEMACS, XEmacs, Jed, Elvis, Vile, Vim,
Codewright, MultiEdit, SlickEdit, Bash, Ksh, Tcsh,
Zsh, BBEdit and BBEdit Lite, Alpha
Where can I get Perl macros for vi?
Where can I get perl-mode for emacs?
How can I use curses with Perl?
How can I use X or Tk with Perl?
How can I generate simple menus without using CGI or
Tk?
How can I make my Perl program run faster?
How can I make my Perl program take less memory?
Don't slurp!, Use map and grep selectively, Avoid
unnecessary quotes and stringification, Pass by
reference, Tie large variables to disk
Is it safe to return a reference to local or lexical
data?
How can I free an array or hash so my program shrinks?
How can I make my CGI script more efficient?
How can I hide the source for my Perl program?
How can I compile my Perl program into byte code or C?
How can I compile Perl into Java?
How can I get "#!perl" to work on [MS-DOS,NT,...]?
Can I write useful Perl programs on the command line?
Why don't Perl one-liners work on my DOS/Mac/VMS system?
Where can I learn about CGI or Web programming in
Perl?
Where can I learn about object-oriented Perl programming?
Where can I learn about linking C with Perl? [h2xs,
xsubpp]
I've read perlembed, perlguts, etc., but I can't embed
perl in my C program; what am I doing wrong?
When I tried to run my script, I got this message.
What does it mean?
What's MakeMaker?
AUTHOR AND COPYRIGHT
perlfaq4 - Data Manipulation ($Revision: 1.9 $, $Date:
2003/10/02 04:44:33 $)
DESCRIPTION
Data: Numbers
Why am I getting long decimals (eg, 19.9499999999999)
instead of the numbers I should be getting (eg,
19.95)?
Why is int() broken?
Why isn't my octal data interpreted correctly?
Does Perl have a round() function? What about ceil()
and floor()? Trig functions?
How do I convert between numeric representations/bases/radixes?
How do I convert hexadecimal into decimal, How do
I convert from decimal to hexadecimal, How do I
convert from octal to decimal, How do I convert
from decimal to octal, How do I convert from
binary to decimal, How do I convert from decimal
to binary
Why doesn't & work the way I want it to?
How do I multiply matrices?
How do I perform an operation on a series of integers?
How can I output Roman numerals?
Why aren't my random numbers random?
How do I get a random number between X and Y?
Data: Dates
How do I find the day or week of the year?
How do I find the current century or millennium?
How can I compare two dates and find the difference?
How can I take a string and turn it into epoch seconds?
How can I find the Julian Day?
How do I find yesterday's date?
Does Perl have a Year 2000 problem? Is Perl Y2K compliant?
Data: Strings
How do I validate input?
How do I unescape a string?
How do I remove consecutive pairs of characters?
How do I expand function calls in a string?
How do I find matching/nesting anything?
How do I reverse a string?
How do I expand tabs in a string?
How do I reformat a paragraph?
How can I access or change N characters of a string?
How do I change the Nth occurrence of something?
How can I count the number of occurrences of a
substring within a string?
How do I capitalize all the words on one line?
How can I split a [character] delimited string except
when inside [character]?
How do I strip blank space from the beginning/end of a
string?
How do I pad a string with blanks or pad a number with
zeroes?
How do I extract selected columns from a string?
How do I find the soundex value of a string?
How can I expand variables in text strings?
What's wrong with always quoting "$vars"?
Why don't my <<HERE documents work?
There must be no space after the << part, There
(probably) should be a semicolon at the end, You
can't (easily) have any space in front of the tag
Data: Arrays
What is the difference between a list and an array?
What is the difference between $array[1] and
@array[1]?
How can I remove duplicate elements from a list or
array?
a), b), c), d), e)
How can I tell whether a certain element is contained
in a list or array?
How do I compute the difference of two arrays? How do
I compute the intersection of two arrays?
How do I test whether two arrays or hashes are equal?
How do I find the first array element for which a
condition is true?
How do I handle linked lists?
How do I handle circular lists?
How do I shuffle an array randomly?
How do I process/modify each element of an array?
How do I select a random element from an array?
How do I permute N elements of a list?
How do I sort an array by (anything)?
How do I manipulate arrays of bits?
Why does defined() return true on empty arrays and
hashes?
Data: Hashes (Associative Arrays)
How do I process an entire hash?
What happens if I add or remove keys from a hash while
iterating over it?
How do I look up a hash element by value?
How can I know how many entries are in a hash?
How do I sort a hash (optionally by value instead of
key)?
How can I always keep my hash sorted?
What's the difference between "delete" and "undef"
with hashes?
Why don't my tied hashes make the defined/exists distinction?
How do I reset an each() operation part-way through?
How can I get the unique keys from two hashes?
How can I store a multidimensional array in a DBM
file?
How can I make my hash remember the order I put
elements into it?
Why does passing a subroutine an undefined element in
a hash cre- ate it?
How can I make the Perl equivalent of a C
structure/C++ class/hash or array of hashes or arrays?
How can I use a reference as a hash key?
Data: Misc
How do I handle binary data correctly?
How do I determine whether a scalar is a number/whole/inte-
ger/float?
How do I keep persistent data across program calls?
How do I print out or copy a recursive data structure?
How do I define methods for every class/object?
How do I verify a credit card checksum?
How do I pack arrays of doubles or floats for XS code?
AUTHOR AND COPYRIGHT
perlfaq5 - Files and Formats ($Revision: 1.9 $, $Date:
2003/01/26 17:45:46 $)
DESCRIPTION
How do I flush/unbuffer an output filehandle? Why
must I do this?
How do I change one line in a file/delete a line in a
file/insert a line in the middle of a file/append to
the beginning of a file?
How do I count the number of lines in a file?
How can I use Perl's "-i" option from within a program?
How do I make a temporary file name?
How can I manipulate fixed-record-length files?
How can I make a filehandle local to a subroutine?
How do I pass filehandles between subroutines? How do
I make an array of file- handles?
How can I use a filehandle indirectly?
How can I set up a footer format to be used with
write()?
How can I write() into a string?
How can I output my numbers with commas added?
How can I translate tildes (~) in a filename?
How come when I open a file read-write it wipes it
out?
Why do I sometimes get an "Argument list too long"
when I use <*>?
Is there a leak/bug in glob()?
How can I open a file with a leading ">" or trailing
blanks?
How can I reliably rename a file?
How can I lock a file?
Why can't I just open(FH, ">file.lock")?
I still don't get locking. I just want to increment
the number in the file. How can I do this?
All I want to do is append a small amount of text to
the end of a file. Do I still have to use locking?
How do I randomly update a binary file?
How do I get a file's timestamp in perl?
How do I set a file's timestamp in perl?
How do I print to more than one file at once?
How can I read in an entire file all at once?
How can I read in a file by paragraphs?
How can I read a single character from a file? From
the key- board?
How can I tell whether there's a character waiting on
a filehan- dle?
How do I do a "tail -f" in perl?
How do I dup() a filehandle in Perl?
How do I close a file descriptor by number?
Why can't I use "C:empo" in DOS paths? Why
doesn't `C:empo.exe` work?
Why doesn't glob("*.*") get all the files?
Why does Perl let me delete read-only files? Why does
"-i" clob- ber protected files? Isn't this a bug in
Perl?
How do I select a random line from a file?
Why do I get weird spaces when I print an array of
lines?
AUTHOR AND COPYRIGHT
perlfaq6 - Regular Expressions ($Revision: 1.9 $, $Date:
2003/01/03 20:05:28 $)
DESCRIPTION
How can I hope to use regular expressions without
creating illeg- ible and unmaintainable code?
Comments Outside the Regex, Comments Inside the
Regex, Different Delimiters
I'm having trouble matching over more than one line.
What's wrong?
How can I pull out lines between two patterns that are
themselves on different lines?
I put a regular expression into $/ but it didn't work.
What's wrong?
How do I substitute case insensitively on the LHS
while preserv- ing case on the RHS?
How can I make "744
How can I match a locale-smart version of
"/[a-zA-Z]/"?
How can I quote a variable to use in a regex?
What is "/o" really for?
How do I use a regular expression to strip C style
comments from a file?
Can I use Perl regular expressions to match balanced
text?
What does it mean that regexes are greedy? How can I
get around it?
How do I process each word on each line?
How can I print out a word-frequency or line-frequency
summary?
How can I do approximate matching? w
How do I efficiently match many regularoexpressions at
once? r
Why don't word-boundary searches with "k
me? f
Why does using $&, $`, or $' slow my program down?
What good is "G" in a regular expression?
Are Perl regexes DFAs or NFAs? Are they POSIX compliant?
What's wrong with using grep in a void context?
How can I match strings with multibyte characters?
How do I match a pattern that is supplied by the user?
AUTHOR AND COPYRIGHT
perlfaq7 - General Perl Language Issues ($Revision: 1.9 $,
$Date: 2003/07/24 02:17:21 $)
DESCRIPTION
Can I get a BNF/yacc/RE for the Perl language?
What are all these $@%&* punctuation signs, and how do
I know when to use them?
Do I always/never have to quote my strings or use
semicolons and commas?
How do I skip some return values?
How do I temporarily block warnings?
What's an extension?
Why do Perl operators have different precedence than C
operators?
How do I declare/create a structure?
How do I create a module?
How do I create a class?
How can I tell if a variable is tainted?
What's a closure?
What is variable suicide and how can I prevent it?
How can I pass/return a {Function, FileHandle, Array,
Hash, Method, Regex}?
Passing Variables and Functions, Passing Filehandles,
Passing Regexes, Passing Methods
How do I create a static variable?
What's the difference between dynamic and lexical
(static) scop- ing? Between local() and my()?
How can I access a dynamic variable while a similarly
named lexi- cal is in scope?
What's the difference between deep and shallow binding?
Why doesn't "my($foo) = <FILE>;" work right?
How do I redefine a builtin function, operator, or
method?
What's the difference between calling a function as
&foo and foo()?
How do I create a switch or case statement?
How can I catch accesses to undefined variables,
functions, or methods?
Why can't a method included in this same file be
found?
How can I find out my current package?
How can I comment out a large block of perl code?
How do I clear a package?
How can I use a variable as a variable name?
What does "bad interpreter" mean?
AUTHOR AND COPYRIGHT
perlfaq8 - System Interaction ($Revision: 1.9 $, $Date:
2003/01/26 17:44:04 $)
DESCRIPTION
How do I find out which operating system I'm running
under?
How come exec() doesn't return?
How do I do fancy stuff with the keyboard/screen/mouse?
Keyboard, Screen, Mouse
How do I print something out in color?
How do I read just one key without waiting for a
return key?
How do I check whether input is ready on the keyboard?
How do I clear the screen?
How do I get the screen size?
How do I ask the user for a password?
How do I read and write the serial port?
lockfiles, open mode, end of line, flushing output,
non-blocking input
How do I decode encrypted password files?
How do I start a process in the background?
STDIN, STDOUT, and STDERR are shared, Signals,
Zombies
How do I trap control characters/signals?
How do I modify the shadow password file on a Unix
system?
How do I set the time and date?
How can I sleep() or alarm() for under a second?
How can I measure time under a second?
How can I do an atexit() or setjmp()/longjmp()?
(Exception han- dling)
Why doesn't my sockets program work under System V
(Solaris)? What does the error message "Protocol not
supported" mean?
How can I call my system's unique C functions from
Perl?
Where do I get the include files to do ioctl() or
syscall()?
Why do setuid perl scripts complain about kernel problems?
How can I open a pipe both to and from a command?
Why can't I get the output of a command with system()?
How can I capture STDERR from an external command?
Why doesn't open() return an error when a pipe open
fails?
What's wrong with using backticks in a void context?
How can I call backticks without shell processing?
Why can't my script read from STDIN after I gave it
EOF (^D on Unix, ^Z on MS-DOS)?
How can I convert my shell script to perl?
Can I use perl to run a telnet or ftp session?
How can I write expect in Perl?
Is there a way to hide perl's command line from
programs such as "ps"?
I {changed directory, modified my environment} in a
perl script. How come the change disappeared when I
exited the script? How do I get my changes to be visible?
Unix
How do I close a process's filehandle without waiting
for it to complete?
How do I fork a daemon process?
How do I find out if I'm running interactively or not?
How do I timeout a slow event?
How do I set CPU limits?
How do I avoid zombies on a Unix system?
How do I use an SQL database?
How do I make a system() exit on control-C?
How do I open a file without blocking?
How do I install a module from CPAN?
What's the difference between require and use?
How do I keep my own module/library directory?
How do I add the directory my program lives in to the
mod- ule/library search path?
How do I add a directory to my include path (@INC) at
runtime?
What is socket.ph and where do I get it?
AUTHOR AND COPYRIGHT
perlfaq9 - Networking ($Revision: 1.9 $, $Date: 2003/01/31
17:36:57 $)
DESCRIPTION
What is the correct form of response from a CGI
script?
My CGI script runs from the command line but not the
browser. (500 Server Error)
How can I get better error messages from a CGI program?
How do I remove HTML from a string?
How do I extract URLs?
How do I download a file from the user's machine? How
do I open a file on another machine?
How do I make a pop-up menu in HTML?
How do I fetch an HTML file?
How do I automate an HTML form submission?
How do I decode or create those %-encodings on the
web?
How do I redirect to another page?
How do I put a password on my web pages?
How do I edit my .htpasswd and .htgroup files with
Perl?
How do I make sure users can't enter values into a
form that cause my CGI script to do bad things?
How do I parse a mail header?
How do I decode a CGI form?
How do I check a valid mail address?
How do I decode a MIME/BASE64 string?
How do I return the user's mail address?
How do I send mail?
How do I use MIME to make an attachment to a mail message?
How do I read mail?
How do I find out my hostname/domainname/IP address?
How do I fetch a news article or the active newsgroups?
How do I fetch/put an FTP file?
How can I do RPC in Perl?
AUTHOR AND COPYRIGHT
perlsyn - Perl syntax
DESCRIPTION
Declarations
Comments
Simple Statements
Truth and Falsehood
Statement Modifiers
Compound Statements
Loop Control
For Loops
Foreach Loops
Basic BLOCKs and Switch Statements
Goto
PODs: Embedded Documentation
Plain Old Comments (Not!)
perldata - Perl data types
DESCRIPTION
Variable names
Context
Scalar values
Scalar value constructors
List value constructors
Subscripts
Slices
Typeglobs and Filehandles
SEE ALSO
perlop - Perl operators and precedence
DESCRIPTION
Operator Precedence and Associativity
Terms and List Operators (Leftward)
The Arrow Operator
Auto-increment and Auto-decrement
Exponentiation
Symbolic Unary Operators
Binding Operators
Multiplicative Operators
Additive Operators
Shift Operators
Named Unary Operators
Relational Operators
Equality Operators
Bitwise And
Bitwise Or and Exclusive Or
C-style Logical And
C-style Logical Or
Range Operators
Conditional Operator
Assignment Operators
Comma Operator
List Operators (Rightward)
Logical Not
Logical And
Logical or and Exclusive Or
C Operators Missing From Perl
unary &, unary *, (TYPE)
Quote and Quote-like Operators
Regexp Quote-Like Operators
?PATTERN?, m/PATTERN/cgimosx, /PATTERN/cgimosx,
q/STRING/, 'STRING', qq/STRING/, "STRING",
qr/STRING/imosx, qx/STRING/, `STRING`, qw/STRING/,
s/PATTERN/REPLACEMENT/egimosx, tr/SEARCHLIST/REPLACEMENTLIST/cds,
y/SEARCHLIST/REPLACEMENTLIST/cds,
<<EOF
Gory details of parsing quoted constructs
Finding the end, Removal of backslashes before
delimiters, Interpolation, "<<'EOF'", "m''",
"s'''", "tr///", "y///", '', "q//", "", ``,
"qq//", "qx//", "<file*glob>", "?RE?", "/RE/",
"m/RE/", "s/RE/foo/",, Interpolation of regular
expressions, Optimization of regular expressions
I/O Operators
Constant Folding
Bitwise String Operators
Integer Arithmetic
Floating-point Arithmetic
Bigger Numbers
perlsub - Perl subroutines
SYNOPSIS
DESCRIPTION
Private Variables via my()
Persistent Private Variables
Temporary Values via local()
Lvalue subroutines
Lvalue subroutines are EXPERIMENTAL
Passing Symbol Table Entries (typeglobs)
When to Still Use local()
Pass by Reference
Prototypes
Constant Functions
Overriding Built-in Functions
Autoloading
Subroutine Attributes
SEE ALSO
perlfunc - Perl builtin functions
DESCRIPTION
Perl Functions by Category
Functions for SCALARs or strings, Regular expressions
and pattern matching, Numeric functions,
Functions for real @ARRAYs, Functions for list
data, Functions for real %HASHes, Input and output
functions, Functions for fixed length data or
records, Functions for filehandles, files, or
directories, Keywords related to the control flow
of your perl program, Keywords related to scoping,
Miscellaneous functions, Functions for processes
and process groups, Keywords related to perl modules,
Keywords related to classes and object-orientedness,
Low-level socket functions, System V
interprocess communication functions, Fetching
user and group info, Fetching network info, Timerelated
functions, Functions new in perl5, Functions
obsoleted in perl5
Portability
Alphabetical Listing of Perl Functions
-X FILEHANDLE, -X EXPR, -X, abs VALUE, abs, accept
NEWSOCKET,GENERICSOCKET, alarm SECONDS, alarm,
atan2 Y,X, bind SOCKET,NAME, binmode FILEHANDLE,
LAYER, binmode FILEHANDLE, bless REF,CLASSNAME,
bless REF, caller EXPR, caller, chdir EXPR, chmod
LIST, chomp VARIABLE, chomp( LIST ), chomp, chop
VARIABLE, chop( LIST ), chop, chown LIST, chr NUMBER,
chr, chroot FILENAME, chroot, close FILEHANDLE,
close, closedir DIRHANDLE, connect
SOCKET,NAME, continue BLOCK, cos EXPR, cos, crypt
PLAINTEXT,SALT, dbmclose HASH, dbmopen
HASH,DBNAME,MASK, defined EXPR, defined, delete
EXPR, die LIST, do BLOCK, do SUBROUTINE(LIST), do
EXPR, dump LABEL, dump, each HASH, eof FILEHANDLE,
eof (), eof, eval EXPR, eval BLOCK, exec LIST,
exec PROGRAM LIST, exists EXPR, exit EXPR, exp
EXPR, exp, fcntl FILEHANDLE,FUNCTION,SCALAR,
fileno FILEHANDLE, flock FILEHANDLE,OPERATION,
fork, format, formline PICTURE,LIST, getc FILEHANDLE,
getc, getlogin, getpeername SOCKET, getpgrp
PID, getppid, getpriority WHICH,WHO, getpwnam
NAME, getgrnam NAME, gethostbyname NAME, getnetbyname
NAME, getprotobyname NAME, getpwuid UID, getgrgid
GID, getservbyname NAME,PROTO, gethostbyaddr
ADDR,ADDRTYPE, getnetbyaddr ADDR,ADDRTYPE, getprotobynumber
NUMBER, getservbyport PORT,PROTO, getpwent,
getgrent, gethostent, getnetent, getprotoent,
getservent, setpwent, setgrent, sethostent
STAYOPEN, setnetent STAYOPEN, setprotoent STAYOPEN,
setservent STAYOPEN, endpwent, endgrent,
endhostent, endnetent, endprotoent, endservent,
getsockname SOCKET, getsockopt SOCKET,LEVEL,OPTNAME,
glob EXPR, glob, gmtime EXPR, goto LABEL,
goto EXPR, goto &NAME, grep BLOCK LIST, grep
EXPR,LIST, hex EXPR, hex, import, index STR,SUBSTR,POSITION,
index STR,SUBSTR, int EXPR, int,
ioctl FILEHANDLE,FUNCTION,SCALAR, join EXPR,LIST,
keys HASH, kill SIGNAL, LIST, last LABEL, last, lc
EXPR, lc, lcfirst EXPR, lcfirst, length EXPR,
length, link OLDFILE,NEWFILE, listen SOCKET,QUEUESIZE,
local EXPR, localtime EXPR, lock THING, log
EXPR, log, lstat EXPR, lstat, m//, map BLOCK LIST,
map EXPR,LIST, mkdir FILENAME,MASK, mkdir FILENAME,
msgctl ID,CMD,ARG, msgget KEY,FLAGS, msgrcv
ID,VAR,SIZE,TYPE,FLAGS, msgsnd ID,MSG,FLAGS, my
EXPR, my TYPE EXPR, my EXPR : ATTRS, my TYPE EXPR
: ATTRS, next LABEL, next, no Module VERSION LIST,
no Module VERSION, no Module LIST, no Module, oct
EXPR, oct, open FILEHANDLE,EXPR, open FILEHANDLE,MODE,EXPR,
open FILEHANDLE,MODE,EXPR,LIST,
open FILEHANDLE,MODE,REFERENCE, open FILEHANDLE,
opendir DIRHANDLE,EXPR, ord EXPR, ord, our EXPR,
our EXPR TYPE, our EXPR : ATTRS, our TYPE EXPR :
ATTRS, pack TEMPLATE,LIST, package NAMESPACE,
package, pipe READHANDLE,WRITEHANDLE, pop ARRAY,
pop, pos SCALAR, pos, print FILEHANDLE LIST, print
LIST, print, printf FILEHANDLE FORMAT, LIST,
printf FORMAT, LIST, prototype FUNCTION, push
ARRAY,LIST, q/STRING/, qq/STRING/, qr/STRING/,
qx/STRING/, qw/STRING/, quotemeta EXPR, quotemeta,
rand EXPR, rand, read FILEHANDLE,SCALAR,LENGTH,OFFSET,
read FILEHANDLE,SCALAR,LENGTH,
readdir DIRHANDLE, readline
EXPR, readlink EXPR, readlink, readpipe EXPR, recv
SOCKET,SCALAR,LENGTH,FLAGS, redo LABEL, redo, ref
EXPR, ref, rename OLDNAME,NEWNAME, require VERSION,
require EXPR, require, reset EXPR, reset,
return EXPR, return, reverse LIST, rewinddir
DIRHANDLE, rindex STR,SUBSTR,POSITION, rindex
STR,SUBSTR, rmdir FILENAME, rmdir, s///, scalar
EXPR, seek FILEHANDLE,POSITION,WHENCE, seekdir
DIRHANDLE,POS, select FILEHANDLE, select, select
RBITS,WBITS,EBITS,TIMEOUT, semctl ID,SEMNUM,CMD,ARG,
semget KEY,NSEMS,FLAGS, semop
KEY,OPSTRING, send SOCKET,MSG,FLAGS,TO, send
SOCKET,MSG,FLAGS, setpgrp PID,PGRP, setpriority
WHICH,WHO,PRIORITY, setsockopt SOCKET,LEVEL,OPTNAME,OPTVAL,
shift ARRAY, shift, shmctl
ID,CMD,ARG, shmget KEY,SIZE,FLAGS, shmread
ID,VAR,POS,SIZE, shmwrite ID,STRING,POS,SIZE,
shutdown SOCKET,HOW, sin EXPR, sin, sleep EXPR,
sleep, socket SOCKET,DOMAIN,TYPE,PROTOCOL, socketpair
SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL, sort
SUBNAME LIST, sort BLOCK LIST, sort LIST, splice
ARRAY,OFFSET,LENGTH,LIST, splice ARRAY,OFFSET,LENGTH,
splice ARRAY,OFFSET, splice ARRAY,
split /PATTERN/,EXPR,LIMIT, split /PATTERN/,EXPR,
split /PATTERN/, split, sprintf FORMAT, LIST, format
parameter index, flags, vector flag, (minimum)
width, precision, or maximum width, size, order of
arguments, sqrt EXPR, sqrt, srand EXPR, srand,
stat FILEHANDLE, stat EXPR, stat, study SCALAR,
study, sub NAME BLOCK, sub NAME (PROTO) BLOCK, sub
NAME : ATTRS BLOCK, sub NAME (PROTO) : ATTRS
BLOCK, substr EXPR,OFFSET,LENGTH,REPLACEMENT, substr
EXPR,OFFSET,LENGTH, substr EXPR,OFFSET, symlink
OLDFILE,NEWFILE, syscall NUMBER, LIST,
sysopen FILEHANDLE,FILENAME,MODE, sysopen
FILEHANDLE,FILENAME,MODE,PERMS, sysread FILEHANDLE,SCALAR,LENGTH,OFFSET,
sysread FILEHANDLE,SCALAR,LENGTH,
sysseek FILEHANDLE,POSITION,WHENCE,
system LIST, system PROGRAM LIST,
syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET, syswrite
FILEHANDLE,SCALAR,LENGTH, syswrite FILEHANDLE,SCALAR,
tell FILEHANDLE, tell, telldir DIRHANDLE,
tie VARIABLE,CLASSNAME,LIST, tied VARIABLE,
time, times, tr///, truncate FILEHANDLE,LENGTH,
truncate EXPR,LENGTH, uc EXPR, uc, ucfirst EXPR,
ucfirst, umask EXPR, umask, undef EXPR, undef,
unlink LIST, unlink, unpack TEMPLATE,EXPR, untie
VARIABLE, unshift ARRAY,LIST, use Module VERSION
LIST, use Module VERSION, use Module LIST, use
Module, use VERSION, utime LIST, values HASH, vec
EXPR,OFFSET,BITS, wait, waitpid PID,FLAGS, wantarray,
warn LIST, write FILEHANDLE, write EXPR,
write, y///
perlopentut - tutorial on opening things in Perl
DESCRIPTION
Open A la shell
Simple Opens
Indirect Filehandles
Pipe Opens
The Minus File
Mixing Reads and Writes
Filters
Open A la C
Permissions A la mode
Obscure Open Tricks
Re-Opening Files (dups)
Dispelling the Dweomer
Paths as Opens
Single Argument Open
Playing with STDIN and STDOUT
Other I/O Issues
Opening Non-File Files
Opening Named Pipes
Opening Sockets
Binary Files
File Locking
IO Layers
SEE ALSO
AUTHOR and COPYRIGHT
HISTORY
perlpacktut - tutorial on "pack" and "unpack"
DESCRIPTION
The Basic Principle
Packing Text
Packing Numbers
Integers
Unpacking a Stack Frame
How to Eat an Egg on a Net
Floating point Numbers
Exotic Templates
Bit Strings
Uuencoding
Doing Sums
Unicode
Another Portable Binary Encoding
Template Grouping
Lengths and Widths
String Lengths
Dynamic Templates
Counting Repetitions
Packing and Unpacking C Structures
The Alignment Pit
Alignment, Take 2
Alignment, Take 3
Pointers for How to Use Them
Pack Recipes
Funnies Section
Authors
perlpod - the Plain Old Documentation format
DESCRIPTION
Ordinary Paragraph
Verbatim Paragraph
Command Paragraph
"=head1 Heading Text", "=head2 Heading Text",
"=head3 Heading Text", "=head4 Heading Text",
"=over indentlevel", "=item stuff...", "=back",
"=cut", "=pod", "=begin formatname", "=end formatname",
"=for formatname text...", "=encoding
encodingname"
Formatting Codes
"I<text>" -- italic text, "B<text>" -- bold text,
"C<code>" -- code text, "L<name>" -- a hyperlink,
"E<escape>" -- a character escape, "F<filename>"
-- used for filenames, "S<text>" -- text contains
non-breaking spaces, "X<topic name>" -- an index
entry, "Z<>" -- a null (zero-effect) formatting
code
The Intent
Embedding Pods in Perl Modules
Hints for Writing Pod
SEE ALSO
AUTHOR
perlpodspec - Plain Old Documentation: format specifica-
tion and notes
DESCRIPTION
Pod Definitions
Pod Commands
"=head1", "=head2", "=head3", "=head4", "=pod",
"=cut", "=over", "=item", "=back", "=begin formatname",
"=end formatname", "=for formatname text...",
"=encoding encodingname"
Pod Formatting Codes
"I<text>" -- italic text, "B<text>" -- bold text,
"C<code>" -- code text, "F<filename>" -- style for
filenames, "X<topic name>" -- an index entry, "Z<>" --
a null (zero-effect) formatting code, "L<name>" -- a
hyperlink, "E<escape>" -- a character escape,
"S<text>" -- text contains non-breaking spaces
Notes on Implementing Pod Processors
About L<...> Codes
First:, Second:, Third:, Fourth:, Fifth:, Sixth:
About =over...=back Regions
About Data Paragraphs and "=begin/=end" Regions
SEE ALSO
AUTHOR
perlrun - how to execute the Perl interpreter
SYNOPSIS
DESCRIPTION
#! and quoting on non-Unix systems
OS/2, MS-DOS, Win95/NT, Macintosh, VMS
Location of Perl
Command Switches
-0[octal/hexadecimal], -a, -C [number/list], -c,
-d, -d:foo[=bar,baz], -Dletters, -Dnumber, -e com-
mandline, -Fpattern, -h, -i[extension], -Idirec-
tory, -l[octnum], -m[-]module, -M[-]module,
-M[-]'module ...', -[mM][-]module=arg[,arg]...,
-n, -p, -P, -s, -S, -t, -T, -u, -U, -v, -V,
-V:NAME, -w, -W, -X, -x, -x directory
ENVIRONMENT
HOME, LOGDIR, PATH, PERL5LIB, PERL5OPT, PERLIO,
:bytes, :crlf, :mmap, :perlio, :pop, :raw, :stdio,
:unix, :utf8, :win32, PERLIO_DEBUG, PERLLIB, PERL5DB,
PERL5SHELL (specific to the Win32 port),
PERL_DEBUG_MSTATS, PERL_DESTRUCT_LEVEL, PERL_DL_NONLAZY,
PERL_ENCODING, PERL_HASH_SEED,
PERL_HASH_SEED_DEBUG, PERL_ROOT (specific to the VMS
port), PERL_SIGNALS, PERL_UNICODE, SYS$LOGIN (specific
to the VMS port)
perldiag - various Perl diagnostics
DESCRIPTION
perllexwarn - Perl Lexical Warnings
DESCRIPTION
Default Warnings and Optional Warnings
What's wrong with -w and $^W
Controlling Warnings from the Command Line
-w, -W, -X
Backward Compatibility
Category Hierarchy
Fatal Warnings
Reporting Warnings from a Module
TODO
SEE ALSO
AUTHOR
perldebug - Perl debugging
DESCRIPTION
The Perl Debugger
Debugger Commands
h, h [command], h h, p expr, x [maxdepth] expr, V
[pkg [vars]], X [vars], y [level [vars]], T, s
[expr], n [expr], r, <CR>, c [line|sub], l, l
min+incr, l min-max, l line, l subname, -, v
[line], f filename, /pattern/, ?pattern?, L [abw],
S [[!]regex], t, t expr, b, b [line] [condition],
b subname [condition], b postpone subname [condition],
b load filename, b compile subname, B line,
B *, a [line] command, A line, A *, w expr, W
expr, W *, o, o booloption .., o anyoption? .., o
option=value .., < ?, < [ command ], < *, << command,
> ?, > command, > *, >> command, { ?, { [
command ], { *, {{ command, ! number, ! -number, !
pattern, !! cmd, source file, H -number, q or ^D,
R, |dbcmd, ||dbcmd, command, m expr, M, man [manpage]
Configurable Options
"recallCommand", "ShellBang", "pager", "tkRunning",
"signalLevel", "warnLevel", "dieLevel",
"AutoTrace", "LineInfo", "inhibit_exit", "PrintRet",
"ornaments", "frame", "maxTraceLen", "windowSize",
"arrayDepth", "hashDepth", "dumpDepth",
"compactDump", "veryCompact", "globPrint",
"DumpDBFiles", "DumpPackages", "DumpReused",
"quote", "HighBit", "undefPrint", "UsageOnly",
"TTY", "noTTY", "ReadLine", "NonStop"
Debugger input/output
Prompt, Multiline commands, Stack backtrace, Line
Listing Format, Frame listing
Debugging compile-time statements
Debugger Customization
Readline Support
Editor Support for Debugging
The Perl Profiler
Debugging regular expressions
Debugging memory usage
SEE ALSO
BUGS
perlvar - Perl predefined variables
DESCRIPTION
Predefined Names
$ARG, $_, $a, $b, $<digits>, $MATCH, $&, $PREMATCH,
$`, $POSTMATCH, $', $LAST_PAREN_MATCH, $+,
$^N, @LAST_MATCH_END, @+, $*, HANDLE->input_line_number(EXPR),
$INPUT_LINE_NUMBER,
$NR, $, IO::Handle->input_record_separator(EXPR),
$INPUT_RECORD_SEPARATOR, $RS, $/, HANDLE->autoflush(EXPR),
$OUTPUT_AUTOFLUSH, $|, IO::Handle->output_field_separator
EXPR, $OUTPUT_FIELD_SEPARATOR,
$OFS, $,, IO::Handle->output_record_separator
EXPR, $OUTPUT_RECORD_SEPARATOR,
$ORS, $ $LIST_SEPARATOR, $", $SUBSCRIPT_SEPARATOR,
$SUBSEP, $;, $#, HANDLE->format_page_number(EXPR),
$FORMAT_PAGE_NUMBER, $%,
HANDLE->format_lines_per_page(EXPR), $FORMAT_LINES_PER_PAGE,
$=, HANDLE->format_lines_left(EXPR),
$FORMAT_LINES_LEFT, $-,
@LAST_MATCH_START, @-, $` is the same as "substr($var,
0, $-[0])", $& is the same as "substr($var,
$-[0], $+[0] - $-[0])", $' is the same
as "substr($var, $+[0])", $1 is the same as "substr($var,
$-[1], $+[1] - $-[1])", $2 is the same
as "substr($var, $-[2], $+[2] - $-[2])", $3 is the
same as "substr $var, $-[3], $+[3] - $-[3])", HANDLE->format_name(EXPR),
$FORMAT_NAME, $~, HANDLE->format_top_name(EXPR),
$FORMAT_TOP_NAME, $^,
IO::Handle->format_line_break_characters EXPR,
$FORMAT_LINE_BREAK_CHARACTERS, $:,
IO::Handle->format_formfeed EXPR, $FORMAT_FORMFEED,
$^L, $ACCUMULATOR, $^A, $CHILD_ERROR, $?,
${^ENCODING}, $OS_ERROR, $ERRNO, $!, %!,
$EXTENDED_OS_ERROR, $^E, $EVAL_ERROR, $@, $PROCESS_ID,
$PID, $$, $REAL_USER_ID, $UID, $<,
$EFFECTIV
|