Movatterモバイル変換


[0]ホーム

URL:


perl
(source,CPAN)
You are viewing the version of this documentation from Perl 5.30.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 ]...

For more information on these options, you can runperldoc perlrun.

#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 beginnersperlrunPerl execution and optionsperltocPerl documentation table of contents

#Tutorials

perlreftutPerl references short introductionperldscPerl data structures introperllolPerl data structures: arrays of arraysperlrequick Perl regular expressions quick startperlretutPerl regular expressions tutorialperlootutPerl OO tutorial for beginnersperlperfPerl 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 guideperldiagPerl diagnostic messagesperldeprecation     Perl deprecationsperllexwarn 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 supportperlunicook Perl Unicode cookbookperlunifaqPerl Unicode FAQperlunipropsIndex of Unicode 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 distributionperlfilterPerl source filtersperldtracePerl's support for DTraceperlglossaryPerl 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 interfaceperlxstypemapPerl XS C/Perl type conversion toolsperlclibInternal 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 interpreter 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 informationperldocLook up Perl documentation in Pod formatperlhistPerl history recordsperldeltaPerl changes since previous versionperl5301deltaPerl changes in version 5.30.1perl5300deltaPerl changes in version 5.30.0perl5282deltaPerl changes in version 5.28.2perl5281deltaPerl changes in version 5.28.1perl5280deltaPerl changes in version 5.28.0perl5263deltaPerl changes in version 5.26.3perl5262deltaPerl changes in version 5.26.2perl5261deltaPerl changes in version 5.26.1perl5260deltaPerl changes in version 5.26.0perl5244deltaPerl changes in version 5.24.4perl5243deltaPerl changes in version 5.24.3perl5242deltaPerl changes in version 5.24.2perl5241deltaPerl changes in version 5.24.1perl5240deltaPerl changes in version 5.24.0perl5224deltaPerl changes in version 5.22.4perl5223deltaPerl changes in version 5.22.3perl5222deltaPerl changes in version 5.22.2perl5221deltaPerl changes in version 5.22.1perl5220deltaPerl changes in version 5.22.0perl5203deltaPerl changes in version 5.20.3perl5202deltaPerl changes in version 5.20.2perl5201deltaPerl changes in version 5.20.1perl5200deltaPerl changes in version 5.20.0perl5184deltaPerl changes in version 5.18.4perl5182deltaPerl changes in version 5.18.2perl5181deltaPerl changes in version 5.18.1perl5180deltaPerl changes in version 5.18.0perl5163deltaPerl changes in version 5.16.3perl5162deltaPerl changes in version 5.16.2perl5161deltaPerl changes in version 5.16.1perl5160deltaPerl changes in version 5.16.0perl5144deltaPerl changes in version 5.14.4perl5143deltaPerl changes in version 5.14.3perl5142deltaPerl changes in version 5.14.2perl5141deltaPerl changes in version 5.14.1perl5140deltaPerl changes in version 5.14.0perl5125deltaPerl changes in version 5.12.5perl5124deltaPerl changes in version 5.12.4perl5123deltaPerl changes in version 5.12.3perl5122deltaPerl changes in version 5.12.2perl5121deltaPerl changes in version 5.12.1perl5120deltaPerl changes in version 5.12.0perl5101deltaPerl changes in version 5.10.1perl5100deltaPerl changes in version 5.10.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.0perl561deltaPerl changes in version 5.6.1perl56delta Perl changes in version 5.6perl5005deltaPerl changes in version 5.005perl5004deltaPerl changes in version 5.004perlexperimentA listing of experimental features in PerlperlartisticPerl 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 AmigaOSperlandroidPerl notes for Androidperlbs2000Perl notes for POSIX-BC BS2000perlcePerl notes for WinCEperlcygwinPerl notes for CygwinperldosPerl notes for DOSperlfreebsd 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 Xperlnetware 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 Symbianperlsynology Perl notes for Synologyperltru64Perl notes for Tru64perlvmsPerl notes for VMSperlvosPerl notes for Stratus VOSperlwin32Perl notes for Windows

#Stubs for Deleted Documents

perlbootperlbotperlrepositoryperltodoperltoocperltoot

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

Some documentation is not available as man pages, so if a cross-reference is not found by man, try it withperldoc. Perldoc can also take you directly to documentation for functions (with the-f switch). Seeperldoc --help (orperldoc perldoc orman perldoc) for other helpful optionsperldoc has to offer.

In general, if something strange has gone wrong with your program and you're not sure where you should look for help, try making your code comply withusestrict andusewarnings. These 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). It combines (in the author's opinion, anyway) some of the best features ofsed,awk, andsh, making it familiar and easy to use for Unix users to whip up quick solutions to annoying problems. Its general-purpose programming facilities support procedural, functional, and object-oriented programming paradigms, making Perl a comfortable language for the long haul on major projects, whatever your bent.

Perl's roots in text processing haven't been forgotten over the years. It still boasts some of the most powerful regular expressions to be found anywhere, and its support for Unicode text is world-class. It handles all kinds of structured text, too, through an extensive collection of extensions. Those libraries, collected in the CPAN, provide ready-made solutions to an astounding array of problems. When they haven't set the standard themselves, they steal from the best -- just like Perl itself.

#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

"@INC" above is a reference to the built-in variable of the same name; seeperlvar for more information.

#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

Using theusestrict pragma ensures that all variables are properly declared and prevents other misuses of legacy Perl features.

Theusewarnings pragma produces some lovely diagnostics. One can also use the-w flag, but its use is normally discouraged, because it gets applied to all executed Perl code, including that not under your control.

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 theusewarnings pragma?

#BUGS

The behavior implied by theusewarnings pragma 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 submit your bug reports (be sure to include full configuration information as output by the myconfig program in the perl source tree, or byperl -V) tohttps://github.com/Perl/perl5/issues.

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