Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Download
Standard view
Full view
of .
Add note
Save to My Library
Sync to mobile
Look up keyword or section
Like this
1Activity
×

Table Of Contents

0 of .
Results for:
No results containing your search query
P. 1
iperl

iperl

Ratings: (0)|Views: 4,621|Likes:
Published by Admin

More info:

Published by: Admin on Jul 21, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See More
See less

10/25/2012

pdf

text

original

 
Impatient Perl
version: 29 April 2004Copyright 2004 Greg LondonPermission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by theFree Software Foundation; with no Invariant Sections, no Front-Cover Texts, and noBack-Cover Texts. A copy of the license is included in the section entitled "GNU FreeDocumentation License".For more information, or for the latest version of this work, go to:http://www.greglondon.comThis document was created using OpenOffice version 1.1.0(which exports directly to PDF)http://www.openoffice.orgrunning RedHat Linuxhttp://www.redhat.comon a x86 machine fromhttp://www.penguincomputing.com1 of 138
 
Table of Contents
1 The Impatient Introduction to Perl.......................61.1 The history of perl in 100 words or less.............61.2 Basic Formatting for this Document...................61.3 Do You Have Perl Installed...........................71.4 Your First Perl Script, EVER.........................71.5 Default Script Header................................81.6 Free Reference Material..............................91.7 Cheap Reference Material............................91.8 Acronyms and Terms...................................92 Storage.................................................112.1 Scalars.............................................112.1.1 Scalar Strings..................................122.1.1.1 String Literals.............................122.1.1.2 Single quotes versus Double quotes..........122.1.1.3 chomp.......................................132.1.1.4 concatenation...............................132.1.1.5 repetition..................................132.1.1.6 length......................................132.1.1.7 substr......................................132.1.1.8 split.......................................142.1.1.9 join........................................142.1.1.10 qw.........................................142.1.2 Scalar Numbers..................................152.1.2.1 Numeric Literals............................152.1.2.2 Numeric Functions...........................152.1.2.3 abs.........................................152.1.2.4 int.........................................152.1.2.5 trigonometry (sin,cos,tan)..................162.1.2.6 exponentiation..............................162.1.2.7 sqrt........................................162.1.2.8 natural logarithms(exp,log).................172.1.2.9 random numbers (rand, srand)................172.1.3 Converting Between Strings and Numbers..........182.1.3.1 Stringify...................................182.1.3.1.1 sprintf.................................192.1.3.2 Numify......................................192.1.3.2.1 oct.....................................192.1.3.2.2 hex.....................................202.1.4 Undefined and Uninitialized Scalars.............202.1.5 Booleans........................................212.1.5.1 FALSE.......................................222.1.5.2 TRUE........................................222.1.5.3 Comparators.................................232.1.5.4 Logical Operators...........................232.1.5.4.1 Default Values..........................242.1.5.4.2 Flow Control............................252.1.5.4.3 Precedence..............................252.1.5.4.4 Assignment Precedence...................25
2 of 138
 
2.1.5.4.5 Flow Control Precedence.................252.1.6 References......................................262.1.7 Filehandles.....................................272.1.8 Scalar Review...................................272.2 Arrays..............................................272.2.1 scalar (@array)................................292.2.2 push(@array, LIST)..............................292.2.3 pop(@array).....................................302.2.4 shift(@array)...................................302.2.5 unshift( @array, LIST)..........................302.2.6 foreach (@array)................................312.2.7 sort(@array)....................................322.2.8 reverse(@array).................................332.2.9 splice(@array)..................................332.2.10 Undefined and Uninitialized Arrays.............332.3 Hashes..............................................342.3.1 exists ( $hash{$key} )..........................352.3.2 delete ( $hash{key} )...........................362.3.3 keys( %hash )...................................372.3.4 values( %hash ).................................382.3.5 each( %hash )...................................382.4 List Context........................................432.5 References..........................................452.5.1 Named Referents.................................462.5.2 References to Named Referents...................462.5.3 Dereferencing...................................462.5.4 Anonymous Referents.............................472.5.5 Complex Data Structures.........................492.5.5.1 Autovivification............................502.5.5.2 Multidimensional Arrays.....................512.5.6 Stringification of References...................512.5.7 The ref() function..............................523 Control Flow............................................533.1 Labels..............................................543.2 last LABEL;.........................................553.3 next LABEL;.........................................553.4 redo LABEL;.........................................554 Packages and Namespaces and Lexical Scoping............554.1 Package Declaration.................................554.2 Declaring Package Variables With our................564.3 Package Variables inside a Lexical Scope............574.4 Lexical Scope.......................................584.5 Lexical Variables...................................584.6 Garbage Collection..................................604.6.1 Reference Count Garbage Collection..............604.6.2 Garbage Collection and Subroutines..............604.7 Package Variables Revisited.........................614.8 Calling local() on Package Variables................625 Subroutines.............................................645.1 Subroutine Sigil....................................645.2 Named Subroutines...................................645.3 Anonymous Subroutines...............................655.4 Data::Dumper and subroutines........................65
3 of 138

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->