Limit search to available items
Book Cover
Author Herrmann, Eric.

Title Mastering Perl 5 / Eric C. Herrmann
Published San Francisco : Sybex, [1999]
Table of Contents
Part IA Quick Start to Perl Programming 
 1Writing Your First Program3
   Introducing Perl 54
    The Evolution of Perl4
    A Perl Program6
    Perl as an Interpreted Language7
    Windows, Unix, and Perl9
   Running Perl Programs11
    Using the MS-DOS Window11
    Using the Unix Command Shell16
   Using Programmer's Editors20
    Choosing a Windows Editor21
    Choosing a Unix Editor23
    Modifying a Program25
   Understanding Perl Syntax Basics27
    Perl Program Structure27
    Perl Program Components28
   Writing a CGI Program30
    Defining CGI31
    Understanding the Client/Server Interface Model32
    Understanding HTTP Communications33
    Configuring the Web Server36
    Writing the Registration Form38
    Creating the CGI Program41
    Installing CGI Programs44
    Understanding How a CGI Program Works45
 2Debugging Your Programs53
   Handling Syntax Errors55
    Pinpointing Syntax Errors55
    Understanding Error Messages58
   Avoiding Errors63
    Turning On Warning Messages63
    Avoiding Misspelled Variable Names63
    Following Good Coding Practices64
    Testing Loop and Conditional Expressions65
    Avoiding Common Perl 5 Mistakes67
    Handling Runtime Errors70
    Using the System Error Variable70
    Inserting print Statements72
    Searching for Bugs73
   Using a Debugger73
    Running the Perl Debugger74
    Debugging Using Emacs81
    Running the ActiveState Windows Debugger83
   Debugging CGI Programs85
    Running the Program with Test Data86
    Adding print Statements87
Part IIPerl Programming Fundamentals 
 3Jump-Start on Programming Fundamentals95
   Jump-Start Definitions96
   Jump-Start Program100
   Operators and Context106
    Variable Names109
    Namespaces and Variable Declarations110
    Scalar Variables111
   Control Structures123
    The if Family123
    The SWITCH Construct125
    The for Loop127
    The foreach Loop128
    The while and until Loops129
   What Next?130
 4Operators and Programming Fundamentals133
   Perl 5 and Context134
   Numeric Operations135
    Basic Numeric Operations135
    The Assignment Operator137
    Compound Assignment Operators138
    Increment and Decrement Operators141
   Boolean Operations143
   String Operations147
    String Comparisons150
    ASCII Characters151
   Boolean Combination Operations155
    The Logical AND Operator156
    The Logical OR Operator158
    The Logical NOT Operator158
   Binary Operations160
    Binary Numbers160
    Hexadecimal Numbers163
    Binary Operators164
   Precedence and Associativity167
 5Scalar Data173
   An Introduction to Scalar Variables174
    What's a Scalar Variable?175
    Scalar Variable Names176
    What's a Literal?177
   Strings and Character Data177
    Quotation Marks178
    The Quote Operators184
    Rules for String Literals187
   Numeric Literals187
    Numeric Formats189
    Fixed-Point Number Solutions189
   Boolean Values195
   Variable Declarations196
    Variables and Namespaces197
    The my and local Keywords198
    The Case against Recycled Variables199
   Scalar Context versus List Context199
 6Arrays and Hashes205
   An Introduction to Arrays206
   Array Data Storage and Retrieval208
    Array Cell Assignment208
    Array List Assignment211
    Array Sizing213
    Array Data Retrieval217
    Array Slices218
   Built-In Functions for Working with Arrays222
    Stack and Queue Functions222
    List Modification with the splice Function227
    Array Sorting Functions228
   An Introduction to Hashes230
   Hash Data Storage and Retrieval231
    Hash Keys232
    Hash Value Retrieval235
   Built-In Functions for Working with Hashes236
    Key Retrieval Functions236
    Item Removal with the delete Function241
    Item Verification with the exists Function241
   An Introduction to References246
    Reference Operators248
    Types of Reference Variables248
   Direct References and Dereferencing251
    Direct Scalar References252
    Direct Array References254
    Direct Hash References257
    A Quick Recap257
   Dereferencing Alternatives258
    Curly Braces258
    The Right Arrow Operator259
    Square Brackets259
   Multi-Dimensional Arrays260
   Three-Dimensional Array Dereferencing264
    The Last Cell Index for Loop Control264
    Multi-Dimensional Arrays as Indexes265
   Anonymous Arrays and Hashes266
 8Conditional Statements271
   An Introduction to Branching Statements272
    Simple Conditional Expressions273
    Blocks of Statements274
    Complex Conditional Expressions275
   Good Coding Practices276
    Commenting Your Code276
    Using Variable Names as Array Indexes279
   The if Family281
    if else Statements282
    if elsif else Statements284
    Nested if Clauses versus elsif Clauses286
   Switch Simulation293
    The split Function300
    if Blocks versus Simulated switch Statements301
   The Ternary Operator305
   An Introduction to Loops310
   while/until Loops and do Statements312
    while Loops312
    until Loops316
    The do Statement317
   The for and foreach Loops322
    for Loops322
    foreach loops326
    Array References in Loops339
   Loop Modifiers343
    The continue Block343
    The last Command344
    The redo Command346
Part IIIInput and Output Handling 
 10Jump-Start on Input/Output351
   Jump-Start Definitions352
   Jump-Start Program354
   Command-Line Input356
   File Input358
    Opening a File358
    Reading from a File360
   File Output362
    Outputting Program Data362
    Setting and Closing File Handles363
    Formatting Output Data364
    Reading a Directory365
    Creating, Deleting, and Changing Directories366
   File and Directory Modules367
   What Next?368
 11Input and Output Basics371
   Command-Line Input372
    Command-Line Arguments373
    Command-Line Switches381
   Opening Files388
    Parts of a Filename388
    File Handles390
    The open Function391
   Moving through Files393
   Positioning with the seek Function394
    Reading the File into an Array396
   Modifying Files397
    Using the Hard Disk as Workspace399
    Using Memory as Workspace401
    Closing Files403
    Appending Data403
    Deleting a File403
   Using File Test Operators405
    File Privileges Tests410
    File Type Tests412
    File Existence and Size Tests413
    File Modification Tests413
    Unix File Handle Type Tests414
 12Printing and Formatting Techniques417
   Using the print Function418
    Setting the Default File Handle419
    Using the Heredoc Operator420
   Using Print Formatting Functions423
    Formatting with printf and sprintf423
    Using Print Escape Sequences429
    Printing Arrays430
   Writing Formatted Output432
    Naming Formats435
    Defining Format Output435
    Formatting with Special Variables437
    Handling Long Data Items439
 13Directories and System I/O Utilities445
   Directory Modules and Functions446
    Working with Directories448
    Working with Directory Handles452
   File Functions456
    Opening a File457
    Reading and Writing to a File458
    Getting and Setting File Information460
    Using Unix-Only Functions469
   File Modules470
    Platform-Independent File Symbols472
    Platform-Independent Copying and Moving473
    I/O Interfaces474
    A File System Operations Interface479
Part IVData Manipulation 
 14Jump-Start on String Functions and Regular Expressions485
   Jump-Start Definitions486
   Jump-Start Program488
   String Functions490
    The length Function492
    The split Function492
    The translate Function493
    The substitute Function493
    The index Function494
    The substr Function494
    Character-Case Functions494
   Regular Expressions495
    The Pattern-Match Function496
    Elements of Regular Expressions496
    A Regular Expression Example499
   What Next?502
 15String Manipulation505
   Working with String Parts506
    Getting the First and Last Position of a Substring506
    Extracting Substrings508
    Getting the String's Length509
    Replacing Strings511
   Changing Characters513
    Translating between Numbers and Characters513
    Changing Case518
    Translating Single Characters521
    Removing End-of-Line Characters522
   Separating and Joining Strings524
    Splitting Strings524
    Joining Strings Together529
   Packing Characters530
   Creating Sorting Subroutines534
    Using Comparison Operators535
    Sorting a Hash by Value537
    Sorting under Multiple Conditions538
 16Regular Expressions545
   An Introduction to Regular Expressions546
    The Functions for Matching Patterns546
    Matches in Conditional Expressions548
   Regular Expression Components549
    Rules for Building Regular Expressions552
    Pattern-Match Variables565
   Pattern Modifiers568
    Global Matches568
    Ignore Case Matches569
    Multiple and Single Line Matches570
    Only Once Please571
    Extra Spaces and Comments572
   Regular Expression Examples573
    A Simple Pattern573
    A Whole Word Match574
    Electronic Commerce Patterns576
    A Globally Lazy Match581
Part VAdvanced Perl Programming 
 17Jump-Start on Advanced Programming Concepts589
   Jump-Start Definitions590
   Jump-Start Program594
    Package Namespaces598
    Qualified and Unqualified Names599
   Data Scope600
    Global Scope601
    Dynamic Scope602
    Lexical Scope602
    Subroutine Calls603
    Subroutine Parameters604
    Subroutine Return Values606
   Object-Oriented Perl 5606
    Object Methods607
    Object Variables609
   E-Mail Transfer611
   What Next?613
 8Functional Programming615
    Package Definition617
    Symbol Tables622
   Data Scope628
    Global Scope629
    Dynamic Scope630
    Lexical Scope632
   Subroutines and Functions636
    Subroutine Definition636
    Subroutine Calling Syntax637
    Subroutine Parameter Lists639
    Returning Data643
 19Object-Oriented Programming649
   An Introduction to Objects and Classes650
    Object Characteristics650
    Object Classes651
   Object Methods651
    Class Methods652
    Object Reference Variables654
    Instance Methods658
   Object Variables662
    Instance Variables663
    Class Variables668
   Named Parameters671
 20E-Mail Solutions685
   An Introduction to E-Mail Programs and Protocols686
    The sendmail Program687
    SMTP Servers688
   Unix E-Mail Solutions691
    A Registration Application691
    A Mailing List Application699
   Windows E-Mail Solutions702
    Blat: A Windows E-Mail Program703 A Perl E-Mail Interface708
Part VIWindows Only 
 21Jump-Start on Windows Solutions729
   Jump-Start Definitions730
   Jump-Start Program732
   Windows System Information739
    Drive Information739
    File System Information740
    User Information741
    Network Information743
   Registry Information745
    Event Log Information747
   Perl and Your Windows Database749
    The Database Interface750
    SQL Statements752
   What Next?754
 22Win32 System Administration757
   Win32 Extensions758
   The Disk Drive762
    Getting the Drives762
    Getting the Disk Configuration764
   The File System768
   User Information773
    Getting Login Information773
    Getting User Details775
   Network Administration780
    Building a Network Diagnostic Utilities Interface780
    Managing Physical Addresses786
    Configuring TCP/IP787
    Getting NetBIOS Statistics789
    Using PING791
    Getting Network Routing Tables793
    Tracing Internet Routes795
   DLL Functions797
 23The Registry and Event Log803
   An Introduction to the Registry804
    Running the Registry Editor804
    Backing Up Your Registry806
   Registry Manipulation807
    Reading the Registry807
    Creating a Registry Key812
    Deleting Registry Keys814
    Getting Registry Data816
    Modifying Registry Data819
   An Introduction to the Event Log821
   Event Log Manipulation823
    Reading the Event Log824
    Writing to the Event Log831
    Using Other EventLog Methods833
    Extending the EventLog Class835
 24Databases and the Web843
   An Introduction to Databases844
   The ODBC Connection845
    Creating a DSN846
    The Win32::ODBC Module853
   Existing Data858
    Creating a Database Table858
    Importing Text Data860
   SQL--The Database Language863
    Creating a Table865
    Modifying a Table868
    Inserting Data into a Table869
    Deleting Data from a Table870
    Updating Data in a Table872
    Selecting Data from a Table872
   Your Database and the Internet873
    Setting Up for Access and the Web874
    Initializing the Transportation Database876
    Importing Data into the Transportation Database880
    Searching for Cars on the Web885
    Displaying the Online Search Results888


Location Call no. Vol. Availability
 W'PONDS  005.133 Perl Her/Mpf  AVAILABLE
Description xxxi, 926 pages : illustrations ; 23 cm
Contents Pt. I. A Quick Start to Perl Programming. Ch. 1. Writing Your First Program. Ch. 2. Debugging Your Program -- Pt. II. Peri Programming Fundamentals. Ch. 3. Jump-Start on Programming Fundamentals. Ch. 4. Operators and Programming Fundamentals. Ch. 5. Scalar Data. Ch. 6. Arrays and Hashes. Ch. 7. References. Ch. 8. Conditional Statements. Ch. 9. Loops -- Pt. III. Input and Output Handling. Ch. 10. Jump-Start on Input/Output. Ch. 11. Input and Output Basics. Ch. 12. Printing and Formatting Techniques. Ch. 13. Directories and System I/O Utilities -- Pt. IV. Data Manipulation. Ch. 14. Jump-Start on String Functions and Regular Expressions. Ch. 15. String Manipulation. Ch. 16. Regular Expressions -- Pt. V. Advanced Perl Programming. Ch. 17. Jump-Start on Advanced Programming Concepts. Ch. 18. Functional Programming. Ch. 19. Object-Oriented Programming. Ch. 20. E-Mail Solutions -- Pt. VI. Windows Only. Ch. 21. Jump-Start on Windows Solutions. Ch. 22. Win32 System Administration
Ch. 23. The Registry and Event Log. Ch. 24. Databases and the Web
Summary Mastering Perl 5 is like no other book on Perl. Inside, a recognized expert focuses on the latest version of the language, teaching you all the concepts and techniques you need to master, no matter how you're using Perl. Clear, complete explanations and more than 100 practical examples ensure that you will find sound solutions to specific problems
Notes Includes index
Subject Perl (Computer program language)
LC no. 98086868
ISBN 0782122000
Other Titles Mastering Perl five