Movatterモバイル変換


[0]ホーム

URL:


perl
(source,CPAN)
You are viewing the version of this documentation from Perl 5.14.2.View the latest version

CONTENTS

#NAME

perl - The Perl 5 language interpreter

#SYNOPSIS

perl[-sTtuUWX ][-hv ] [-V[:configvar] ][-cw ] [-d[t][:debugger] ] [-D[number/list] ][-pna ] [-Fpattern ] [-l[octal] ] [-0[octal/hexadecimal] ][-Idir ] [-m[-]module ] [-M[-]'module...' ] [-f ][-C [number/list]][-S ][-x[dir] ][-i[extension] ][ [-e|-E]'command' ] [-- ] [programfile ] [argument ]...

#GETTING HELP

Theperldoc program gives you access to all the documentation that comes with Perl. You can get more documentation, tutorials and community support online athttp://www.perl.org/.

If you're new to Perl, you should start by runningperldoc perlintro, which is a general intro for beginners and provides some background to help you navigate the rest of Perl's extensive documentation. Runperldoc perldoc to learn more things you can do withperldoc.

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

#Overview

perlPerl overview (this section)perlintroPerl introduction for beginnersperltocPerl documentation table of contents

#Tutorials

perlreftutPerl references short introductionperldscPerl data structures introperllolPerl data structures: arrays of arraysperlrequick Perl regular expressions quick startperlretutPerl regular expressions tutorialperlbootPerl OO tutorial for beginnersperltootPerl OO tutorial, part 1perltoocPerl OO tutorial, part 2perlbotPerl OO tricks and examplesperlperfPerl Performance and Optimization TechniquesperlstylePerl style guideperlcheatPerl cheat sheetperltrapPerl traps for the unwaryperldebtutPerl debugging tutorialperlfaqPerl frequently asked questionsperlfaq1General Questions About Perlperlfaq2Obtaining and Learning about Perlperlfaq3Programming Toolsperlfaq4Data Manipulationperlfaq5Files and Formatsperlfaq6Regexesperlfaq7Perl Language Issuesperlfaq8System Interactionperlfaq9Networking

#Reference Manual

perlsynPerl syntaxperldataPerl data structuresperlopPerl operators and precedenceperlsubPerl subroutinesperlfuncPerl built-in functionsperlopentutPerl open() tutorialperlpacktutPerl pack() and unpack() tutorialperlpodPerl plain old documentationperlpodspec Perl plain old documentation format specificationperlpodstylePerl POD style guideperlrunPerl execution and optionsperldiagPerl diagnostic messagesperllexwarn Perl warnings and their controlperldebugPerl debuggingperlvarPerl predefined variablesperlrePerl regular expressions, the rest of the storyperlrebackslashPerl regular expression backslash sequencesperlrecharclassPerl regular expression character classesperlrerefPerl regular expressions quick referenceperlrefPerl references, the rest of the storyperlformPerl formatsperlobjPerl objectsperltiePerl objects hidden behind simple variablesperldbmfilterPerl DBM filtersperlipcPerl interprocess communicationperlforkPerl fork() informationperlnumberPerl number semanticsperlthrtutPerl threads tutorialperlportPerl portability guideperllocalePerl locale supportperluniintroPerl Unicode introductionperlunicode Perl Unicode supportperlunifaqPerl Unicode FAQperlunipropsIndex of Unicode Version 6.0.0 properties in PerlperlunitutPerl Unicode tutorialperlebcdicConsiderations for running Perl on EBCDIC platformsperlsecPerl securityperlmodPerl modules: how they workperlmodlibPerl modules: how to write and useperlmodstylePerl modules: how to write modules with styleperlmodinstallPerl modules: how to install from CPANperlnewmodPerl modules: preparing a new module for distributionperlpragmaPerl modules: writing a user pragmaperlutilutilities packaged with the Perl distributionperlcompile Perl compiler suite introperlfilterPerl source filtersperlglossaryPerl Glossary

#Internals and C Language Interface

perlembedPerl ways to embed perl in your C or C++ applicationperldebguts Perl debugging guts and tipsperlxstutPerl XS tutorialperlxsPerl XS application programming interfaceperlclibInternal replacements for standard C library functionsperlgutsPerl internal functions for those doing extensionsperlcallPerl calling conventions from CperlmroapiPerl method resolution plugin interfaceperlreapiPerl regular expression plugin interfaceperlregutsPerl regular expression engine internalsperlapiPerl API listing (autogenerated)perlinternPerl internal functions (autogenerated)perliolC API for Perl's implementation of IO in LayersperlapioPerl internal IO abstraction interfaceperlhackPerl hackers guideperlsourceGuide to the Perl source treeperlinterpOverview of the Perl intepreter source and how it worksperlhacktut Walk through the creation of a simple C code patchperlhacktipsTips for Perl core C code hackingperlpolicyPerl development policiesperlgitUsing git with the Perl repository

#Miscellaneous

perlbookPerl book informationperlcommunityPerl community informationperltodoPerl things to doperldocLook up Perl documentation in Pod formatperlhistPerl history recordsperldeltaPerl changes since previous versionperl5141deltaPerl changes in version 5.14.1perl5140deltaPerl changes in version 5.14.0perl51311deltaPerl changes in version 5.13.11perl51310deltaPerl changes in version 5.13.10perl5139deltaPerl changes in version 5.13.9perl5138deltaPerl changes in version 5.13.8perl5137deltaPerl changes in version 5.13.7perl5136deltaPerl changes in version 5.13.6perl5135deltaPerl changes in version 5.13.5perl5134deltaPerl changes in version 5.13.4perl5133deltaPerl changes in version 5.13.3perl5132deltaPerl changes in version 5.13.2perl5131deltaPerl changes in version 5.13.1perl5130deltaPerl changes in version 5.13.0perl5123deltaPerl changes in version 5.12.3perl5122deltaPerl changes in version 5.12.2perl5121deltaPerl changes in version 5.12.1perl5120deltaPerl changes in version 5.12.0perl5115deltaPerl changes in version 5.11.5perl5114deltaPerl changes in version 5.11.4perl5113deltaPerl changes in version 5.11.3perl5112deltaPerl changes in version 5.11.2perl5111deltaPerl changes in version 5.11.1perl5110deltaPerl changes in version 5.11.0perl5101deltaPerl changes in version 5.10.1perl5100deltaPerl changes in version 5.10.0perl595deltaPerl changes in version 5.9.5perl594deltaPerl changes in version 5.9.4perl593deltaPerl changes in version 5.9.3perl592deltaPerl changes in version 5.9.2perl591deltaPerl changes in version 5.9.1perl590deltaPerl changes in version 5.9.0perl589deltaPerl changes in version 5.8.9perl588deltaPerl changes in version 5.8.8perl587deltaPerl changes in version 5.8.7perl586deltaPerl changes in version 5.8.6perl585deltaPerl changes in version 5.8.5perl584deltaPerl changes in version 5.8.4perl583deltaPerl changes in version 5.8.3perl582deltaPerl changes in version 5.8.2perl581deltaPerl changes in version 5.8.1perl58delta Perl changes in version 5.8.0perl573deltaPerl changes in version 5.7.3perl572deltaPerl changes in version 5.7.2perl571deltaPerl changes in version 5.7.1perl570deltaPerl changes in version 5.7.0perl561deltaPerl changes in version 5.6.1perl56delta Perl changes in version 5.6perl5005deltaPerl changes in version 5.005perl5004deltaPerl changes in version 5.004perlartisticPerl Artistic LicenseperlgplGNU General Public License

#Language-Specific

perlcnPerl for Simplified Chinese (in EUC-CN)perljpPerl for Japanese (in EUC-JP)perlkoPerl for Korean (in EUC-KR)perltwPerl for Traditional Chinese (in Big5)

#Platform-Specific

perlaixPerl notes for AIXperlamigaPerl notes for AmigaOSperlbeosPerl notes for BeOSperlbs2000Perl notes for POSIX-BC BS2000perlcePerl notes for WinCEperlcygwinPerl notes for CygwinperldguxPerl notes for DG/UXperldosPerl notes for DOSperlepocPerl notes for EPOCperlfreebsd Perl notes for FreeBSDperlhaikuPerl notes for HaikuperlhpuxPerl notes for HP-UXperlhurdPerl notes for HurdperlirixPerl notes for IrixperllinuxPerl notes for LinuxperlmacosPerl notes for Mac OS (Classic)perlmacosxPerl notes for Mac OS XperlmpeixPerl notes for MPE/iXperlnetware Perl notes for NetWareperlopenbsd Perl notes for OpenBSDperlos2Perl notes for OS/2perlos390Perl notes for OS/390perlos400Perl notes for OS/400perlplan9Perl notes for Plan 9perlqnxPerl notes for QNXperlriscosPerl notes for RISC OSperlsolaris Perl notes for Solarisperlsymbian Perl notes for Symbianperltru64Perl notes for Tru64perlutsPerl notes for UTSperlvmesaPerl notes for VM/ESAperlvmsPerl notes for VMSperlvosPerl notes for Stratus VOSperlwin32Perl notes for Windows

On a Unix-like system, these documentation files will usually also be available as manpages for use with theman program.

In general, if something strange has gone wrong with your program and you're not sure where you should look for help, try the-w switch first. It will often point out exactly where the trouble is.

#DESCRIPTION

Perl officially stands for Practical Extraction and Report Language, except when it doesn't.

Perl was originally a language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It quickly became a good language for many system management tasks. Over the years, Perl has grown into a general-purpose programming language. It's widely used for everything from quick "one-liners" to full-scale application development.

The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal).

Perl combines (in the author's opinion, anyway) some of the best features of C,sed,awk, andsh, so people familiar with those languages should have little difficulty with it. (Language historians will also note some vestiges ofcsh, Pascal, and even BASIC-PLUS.) Expression syntax corresponds closely to C expression syntax. Unlike most Unix utilities, Perl does not arbitrarily limit the size of your data--if you've got the memory, Perl can slurp in your whole file as a single string. Recursion is of unlimited depth. And the tables used by hashes (sometimes called "associative arrays") grow as necessary to prevent degraded performance. Perl can use sophisticated pattern matching techniques to scan large amounts of data quickly. Although optimized for scanning text, Perl also has many excellent tools for slicing and dicing binary data.

But wait, there's more...

Begun in 1993 (seeperlhist), Perl version 5 is nearly a complete rewrite that provides the following additional benefits:

Okay, that'sdefinitely enough hype.

#AVAILABILITY

Perl is available for most operating systems, including virtually all Unix-like platforms. See"Supported Platforms" in perlport for a listing.

#ENVIRONMENT

Seeperlrun.

#AUTHOR

Larry Wall <larry@wall.org>, with the help of oodles of other folks.

If your Perl success stories and testimonials may be of help to others who wish to advocate the use of Perl in their applications, or if you wish to simply express your gratitude to Larry and the Perl developers, please write to perl-thanks@perl.org .

#FILES

"@INC"locations of perl libraries

#SEE ALSO

http://www.perl.org/       the Perl homepagehttp://www.perl.com/       Perl articles (O'Reilly)http://www.cpan.org/       the Comprehensive Perl Archivehttp://www.pm.org/         the Perl Mongers

#DIAGNOSTICS

Theusewarnings pragma (and the-w switch) produces some lovely diagnostics.

Seeperldiag for explanations of all Perl's diagnostics. Theusediagnostics pragma automatically turns Perl's normally terse warnings and errors into these longer forms.

Compilation errors will tell you the line number of the error, with an indication of the next token or token type that was to be examined. (In a script passed to Perl via-e switches, each-e is counted as one line.)

Setuid scripts have additional constraints that can produce error messages such as "Insecure dependency". Seeperlsec.

Did we mention that you should definitely consider using the-w switch?

#BUGS

The-w switch is not mandatory.

Perl is at the mercy of your machine's definitions of various operations such as type casting, atof(), and floating-point output with sprintf().

If your stdio requires a seek or eof between reads and writes on a particular stream, so does Perl. (This doesn't apply to sysread() and syswrite().)

While none of the built-in data types have any arbitrary size limits (apart from memory size), there are still a few arbitrary limits: a given variable name may not be longer than 251 characters. Line numbers displayed by diagnostics are internally stored as short integers, so they are limited to a maximum of 65535 (higher numbers usually being affected by wraparound).

You may mail your bug reports (be sure to include full configuration information as output by the myconfig program in the perl source tree, or byperl -V) to perlbug@perl.org . If you've succeeded in compiling perl, theperlbug script in theutils/ subdirectory can be used to help mail in a bug report.

Perl actually stands for Pathologically Eclectic Rubbish Lister, but don't tell anyone I said that.

#NOTES

The Perl motto is "There's more than one way to do it." Divining how many more is left as an exercise to the reader.

The three principal virtues of a programmer are Laziness, Impatience, and Hubris. See the Camel Book for why.

Perldoc Browser is maintained by Dan Book (DBOOK). Please contact him via theGitHub issue tracker oremail regarding any issues with the site itself, search, or rendering of documentation.

The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via thePerl issue tracker, themailing list, orIRC to report any issues with the contents or format of the documentation.


[8]ページ先頭

©2009-2025 Movatter.jp