Cari di Perl 
    Perl User Tutorial
Daftar Isi
(Sebelumnya) Index Core Modules A-ZA brief introduction and overv ... (Berikutnya)
Overview

The Perl 5 language interpreter

Daftar Isi

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

The perldoc program gives you access to all the documentation that comeswith Perl. You can get more documentation, tutorials and community supportonline at http://www.perl.org/.

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

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

Overview

  1. perlPerl overview (this section)
  2. perlintroPerl introduction for beginners
  3. perltocPerl documentation table of contents

Tutorials

  1. perlreftutPerl references short introduction
  2. perldscPerl data structures intro
  3. perllolPerl data structures: arrays of arrays
  4. perlrequick Perl regular expressions quick start
  5. perlretutPerl regular expressions tutorial
  6. perlootutPerl OO tutorial for beginners
  7. perlperfPerl Performance and Optimization Techniques
  8. perlstylePerl style guide
  9. perlcheatPerl cheat sheet
  10. perltrapPerl traps for the unwary
  11. perldebtutPerl debugging tutorial
  12. perlfaqPerl frequently asked questions
  13. perlfaq1General Questions About Perl
  14. perlfaq2Obtaining and Learning about Perl
  15. perlfaq3Programming Tools
  16. perlfaq4Data Manipulation
  17. perlfaq5Files and Formats
  18. perlfaq6Regexes
  19. perlfaq7Perl Language Issues
  20. perlfaq8System Interaction
  21. perlfaq9Networking

Reference Manual

  1. perlsynPerl syntax
  2. perldataPerl data structures
  3. perlopPerl operators and precedence
  4. perlsubPerl subroutines
  5. perlfuncPerl built-in functions
  6. perlopentutPerl open() tutorial
  7. perlpacktutPerl pack() and unpack() tutorial
  8. perlpodPerl plain old documentation
  9. perlpodspec Perl plain old documentation format specification
  10. perlpodstylePerl POD style guide
  11. perlrunPerl execution and options
  12. perldiagPerl diagnostic messages
  13. perllexwarn Perl warnings and their control
  14. perldebugPerl debugging
  15. perlvarPerl predefined variables
  16. perlrePerl regular expressions, the rest of the story
  17. perlrebackslashPerl regular expression backslash sequences
  18. perlrecharclassPerl regular expression character classes
  19. perlrerefPerl regular expressions quick reference
  20. perlrefPerl references, the rest of the story
  21. perlformPerl formats
  22. perlobjPerl objects
  23. perltiePerl objects hidden behind simple variables
  24. perldbmfilterPerl DBM filters
  25. perlipcPerl interprocess communication
  26. perlforkPerl fork() information
  27. perlnumberPerl number semantics
  28. perlthrtutPerl threads tutorial
  29. perlportPerl portability guide
  30. perllocalePerl locale support
  31. perluniintroPerl Unicode introduction
  32. perlunicode Perl Unicode support
  33. perlunifaqPerl Unicode FAQ
  34. perlunipropsIndex of Unicode Version 6.0.0 properties in Perl
  35. perlunitutPerl Unicode tutorial
  36. perlebcdicConsiderations for running Perl on EBCDIC platforms
  37. perlsecPerl security
  38. perlmodPerl modules: how they work
  39. perlmodlibPerl modules: how to write and use
  40. perlmodstylePerl modules: how to write modules with style
  41. perlmodinstallPerl modules: how to install from CPAN
  42. perlnewmodPerl modules: preparing a new module for distribution
  43. perlpragmaPerl modules: writing a user pragma
  44. perlutilutilities packaged with the Perl distribution
  45. perlfilterPerl source filters
  46. perldtracePerl's support for DTrace
  47. perlglossaryPerl Glossary

Internals and C Language Interface

  1. perlembedPerl ways to embed perl in your C or C++ application
  2. perldebguts Perl debugging guts and tips
  3. perlxstutPerl XS tutorial
  4. perlxsPerl XS application programming interface
  5. perlxstypemapPerl XS C/Perl type conversion tools
  6. perlclibInternal replacements for standard C library functions
  7. perlgutsPerl internal functions for those doing extensions
  8. perlcallPerl calling conventions from C
  9. perlmroapiPerl method resolution plugin interface
  10. perlreapiPerl regular expression plugin interface
  11. perlregutsPerl regular expression engine internals
  12. perlapiPerl API listing (autogenerated)
  13. perlinternPerl internal functions (autogenerated)
  14. perliolC API for Perl's implementation of IO in Layers
  15. perlapioPerl internal IO abstraction interface
  16. perlhackPerl hackers guide
  17. perlsourceGuide to the Perl source tree
  18. perlinterpOverview of the Perl interpreter source and how it works
  19. perlhacktut Walk through the creation of a simple C code patch
  20. perlhacktipsTips for Perl core C code hacking
  21. perlpolicyPerl development policies
  22. perlgitUsing git with the Perl repository

Miscellaneous

  1. perlbookPerl book information
  2. perlcommunityPerl community information
  3. perldocLook up Perl documentation in Pod format
  4. perlhistPerl history records
  5. perldeltaPerl changes since previous version
  6. perl5160deltaPerl changes in version 5.16.0
  7. perl5142deltaPerl changes in version 5.14.2
  8. perl5141deltaPerl changes in version 5.14.1
  9. perl5140deltaPerl changes in version 5.14.0
  10. perl5124deltaPerl changes in version 5.12.4
  11. perl5123deltaPerl changes in version 5.12.3
  12. perl5122deltaPerl changes in version 5.12.2
  13. perl5121deltaPerl changes in version 5.12.1
  14. perl5120deltaPerl changes in version 5.12.0
  15. perl5101deltaPerl changes in version 5.10.1
  16. perl5100deltaPerl changes in version 5.10.0
  17. perl589deltaPerl changes in version 5.8.9
  18. perl588deltaPerl changes in version 5.8.8
  19. perl587deltaPerl changes in version 5.8.7
  20. perl586deltaPerl changes in version 5.8.6
  21. perl585deltaPerl changes in version 5.8.5
  22. perl584deltaPerl changes in version 5.8.4
  23. perl583deltaPerl changes in version 5.8.3
  24. perl582deltaPerl changes in version 5.8.2
  25. perl581deltaPerl changes in version 5.8.1
  26. perl58delta Perl changes in version 5.8.0
  27. perl561deltaPerl changes in version 5.6.1
  28. perl56delta Perl changes in version 5.6
  29. perl5005deltaPerl changes in version 5.005
  30. perl5004deltaPerl changes in version 5.004
  31. perlexperimentA listing of experimental features in Perl
  32. perlartisticPerl Artistic License
  33. perlgplGNU General Public License

Language-Specific

  1. perlcnPerl for Simplified Chinese (in EUC-CN)
  2. perljpPerl for Japanese (in EUC-JP)
  3. perlkoPerl for Korean (in EUC-KR)
  4. perltwPerl for Traditional Chinese (in Big5)

Platform-Specific

  1. perlaixPerl notes for AIX
  2. perlamigaPerl notes for AmigaOS
  3. perlbeosPerl notes for BeOS
  4. perlbs2000Perl notes for POSIX-BC BS2000
  5. perlcePerl notes for WinCE
  6. perlcygwinPerl notes for Cygwin
  7. perldguxPerl notes for DG/UX
  8. perldosPerl notes for DOS
  9. perlepocPerl notes for EPOC
  10. perlfreebsd Perl notes for FreeBSD
  11. perlhaikuPerl notes for Haiku
  12. perlhpuxPerl notes for HP-UX
  13. perlhurdPerl notes for Hurd
  14. perlirixPerl notes for Irix
  15. perllinuxPerl notes for Linux
  16. perlmacosPerl notes for Mac OS (Classic)
  17. perlmacosxPerl notes for Mac OS X
  18. perlmpeixPerl notes for MPE/iX
  19. perlnetware Perl notes for NetWare
  20. perlopenbsd Perl notes for OpenBSD
  21. perlos2Perl notes for OS/2
  22. perlos390Perl notes for OS/390
  23. perlos400Perl notes for OS/400
  24. perlplan9Perl notes for Plan 9
  25. perlqnxPerl notes for QNX
  26. perlriscosPerl notes for RISC OS
  27. perlsolaris Perl notes for Solaris
  28. perlsymbian Perl notes for Symbian
  29. perltru64Perl notes for Tru64
  30. perlutsPerl notes for UTS
  31. perlvmesaPerl notes for VM/ESA
  32. perlvmsPerl notes for VMS
  33. perlvosPerl notes for Stratus VOS
  34. perlwin32Perl notes for Windows

Stubs for Deleted Documents

  1. perlboot
  2. perlbot
  3. perltodo
  4. perltooc
  5. perltoot

On a Unix-like system, these documentation files will usually also beavailable as manpages for use with the man program.

In general, if something strange has gone wrong with your program and you'renot sure where you should look for help, try the -w switch first. It willoften 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 arbitrarytext files, extracting information from those text files, and printingreports based on that information. It quickly became a good languagefor many system management tasks. Over the years, Perl has grown intoa general-purpose programming language. It's widely used for everythingfrom 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 bestfeatures of C, sed, awk, and sh, so people familiar withthose languages should have little difficulty with it. (Languagehistorians will also note some vestiges of csh, Pascal, and evenBASIC-PLUS.) Expression syntax corresponds closely to Cexpression syntax. Unlike most Unix utilities, Perl does notarbitrarily 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 ofunlimited depth. And the tables used by hashes (sometimes called"associative arrays") grow as necessary to prevent degradedperformance. Perl can use sophisticated pattern matching techniques toscan large amounts of data quickly. Although optimized forscanning text, Perl also has many excellent tools for slicingand dicing binary data.

But wait, there's more...

Begun in 1993 (see perlhist), Perl version 5 is nearly a completerewrite that provides the following additional benefits:

Okay, that's definitely enough hype.

AVAILABILITY

Perl is available for most operating systems, including virtuallyall Unix-like platforms. See Supported Platforms in perlportfor a listing.

ENVIRONMENT

See perlrun.

AUTHOR

Larry Wall <[email protected]>, 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 [email protected] .

FILES

  1. "@INC"locations of perl libraries

SEE ALSO

  1. http://www.perl.org/ the Perl homepage
  2. http://www.perl.com/ Perl articles (O'Reilly)
  3. http://www.cpan.org/ the Comprehensive Perl Archive
  4. http://www.pm.org/ the Perl Mongers

DIAGNOSTICS

The use warnings pragma (and the -w switch) produces some lovely diagnostics.

See perldiag for explanations of all Perl's diagnostics. The usediagnostics pragma automatically turns Perl's normally terse warningsand errors into these longer forms.

Compilation errors will tell you the line number of the error, with anindication 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 errormessages such as "Insecure dependency". See perlsec.

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

BUGS

The -w switch is not mandatory.

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

If your stdio requires a seek or eof between reads and writes on aparticular 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: agiven variable name may not be longer than 251 characters. Line numbersdisplayed by diagnostics are internally stored as short integers,so they are limited to a maximum of 65535 (higher numbers usually beingaffected by wraparound).

You may mail your bug reports (be sure to include full configurationinformation as output by the myconfig program in the perl sourcetree, or by perl -V) to [email protected] . If you've succeededin compiling perl, the perlbug script in the utils/ subdirectorycan be used to help mail in a bug report.

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

NOTES

The Perl motto is "There's more than one way to do it." Divininghow 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.

 
Source : perldoc.perl.org - Official documentation for the Perl programming language
Site maintained by Jon Allen (JJ)     See the project page for more details
Documentation maintained by the Perl 5 Porters
(Sebelumnya) Index Core Modules A-ZA brief introduction and overv ... (Berikutnya)