1 Installation of Perl and Bioperl with Modules for Mysql Databases

Total Page:16

File Type:pdf, Size:1020Kb

1 Installation of Perl and Bioperl with Modules for Mysql Databases Perl Installation Bioinformatics II - Tools for Functional Genomics Installation of Perl and BioPerl with modules for MySQL databases (Windows XP) 1. Installation of ActiveState Perl 1 2. Installation of Perl modules and BioPerl 2 3. Executing Perl scripts 5 4. Installation of the programming editor Proton 7 5. Installation of the programming editor Komodo Edit 8 1. Installation of ActiveState Perl Perl is a script programming language often used for bioinformatics solutions. There are many modules available at the Perl script archive CPAN. A special BioPerl project provides extended functions for bioinformatics. The well-established Windows version provided by ActiveState is ActivePerl 5.8.8.822. The new Perl branch 5.10 was launched recently and the newest ActiveState Perl version published is now 5.10.0.1003. This version is one of the first of the 5.10 developmental branch, it may have some yet undiscovered problems. Some BioPerl libraries originally did not work with the 5.10 version, however, most problems are now solved and the BioPerl community has now published a new guide for the Perl 5.10 series and we suggest therefore using the newest Perl branch. Binaries for Perl 5.10 are available for installation. http://www.activestate.com/Products/ActivePerl/ Download procedure: - Visit the download site: http://www.activestate.com/downloads/ - Choose at the right panel "Language Downloads" → "ActivePerl". - On the next page select at the "Choose from" tab the "Download" button for ("ActivePerl"). - If you want to receive e-mail informations from ActiveState report your details on the next page, else click on the "Continue" button. - On the next page select the required Perl package for download. For a standard Windows distribution we suggest to use the "Windows(x86)" "MSI" package of "ActivePerl 5.8.8.822" (status of December, 19th, 2007): ActivePerl-5.8.8.822-MSWin32-x86-280952.msi 16 221 KB "ActivePerl 5.10.0.1003" (status July, 17th, 2008): ActivePerl-5.10.0.1003-MSWin32-x86-285500.msi (status July, 17th, 2008). Perl Installation Jul-2008 1 Perl Installation Bioinformatics II - Tools for Functional Genomics Warning: It is a good idea to remove any previous Perl installation, before installation of a new ActiveState Perl version. Delete also all previous installed packages (e.g. directory /Perl/site), since deinstallation of the main program will not touch preinstalled packages at the /site subdirectory. Be aware that packages of the 5.10 series are not binary compatible with packages of the 5.8 series and vice versa. If you update to the 5.10 series from 5.8 please update also all previous installed packages. The installation should be done using administrator rights. ActivePerl-5.10.0.1003-MSWin32-x86-285500.msi During installation we suggest to change the preset folder from C:\Perl to C:\Program Files\Perl and to register the Perl program folder in the system path. This allows Windows to start Perl scripts ending with ".pl" by double clicking on them. Check the correct entry in the Windows PATH environment variable: Add at Control Panel → System → Advanced → lower tab Environment variables → lower window system variable “Path” → "Edit" Add at end of line a semicolon “;” and “C:\Program Files\Perl\bin” and additionally at end of line “;” and “C:\Program Files\Perl\site\bin” and → click OK and restart the PC. Hint: The installation program may have added these directories to the path already, but check for any double entries of older versions and remove them. The local Perl Help files are best viewed using your favourite web browser by loading the local index file: file:///C:/Program Files/Perl/html/index.html 2. Installation of Perl modules and BioPerl To use MySQL and BioPerl additional modules have to be installed. These Perl modules (packages) can be downloaded from the module archive CPAN. For Windows Perl, the Active State module repository should be used. Some of the modules (like DBD-mysql or the BioPerl packages) are not provided by ActiveState and may be installed from alternative repositories: A help file for a installed specific module can be reached from the Perl Help files main window, scrolling down the left panel to the module section: (C:\Program Files\Perl\html\index.html). Some modules have a documentation called from the cmd window by entering Perl Installation Jul-2008 2 Perl Installation Bioinformatics II - Tools for Functional Genomics "perldoc module" e.g. module "perldoc cwd" to read the documentation of the package "cwd" allowing to read the current directory. You can enlarge the cmd window vertically using your mouse, clicking at the upper or lower window border and pulling it up or down. The module documentation is listed page for page. Pressing "Enter" will show the next line, pressing the "space" tab the next page. For communication wit a MySQL database four additional modules are needed: DB_File the Berkeley database management module (DBD) DBI the common database interface Data-Table the database table handling routines DBD-mysql the MySQL-driver for trhe DBD database system The ActiveState Repository does not hold the newest version of BioPerl. We suggest to use the new 1.5.2 distribution provided by the BioPerl community. Some BioPerl programs may not work with the 5.10 Perl branch (e.g. Bio::SeqIO::entrezgene). This may be updated soon and we suggest to use already the 5.10 branch. Prerequisite: for ActiveState at least Perl version >= 5.8.8.819. A new BioPerl Wiki for installation on Windows guides through the installation process: http://www.bioperl.org/wiki/Installing_Bioperl_on_Windows Module installation procedure using ppm: Run the module installation tool Perl package manager ppm: → "Start" → "Run" → "cmd" → "ppm" # Starts the Perl package manager ppm uses a convenient graphical interface in the newest Perl versions. Configuration of additional repositories: Select at the main menu item "Edit" → "Preferences" → tab "Repositories" Copy "Name:" and "Location:" (internet link) into the respective entry fields. Do not change "Suggested:" "Install PPM-Repositories". Click on "Add" button to activate them. For the Perl 5.8 branch: Name Location BioPerl-Regular Releases http://bioperl.org/DIST Kobes http://theoryx5.uwinnipeg.ca/ppms Perl Installation Jul-2008 3 Perl Installation Bioinformatics II - Tools for Functional Genomics Bribes http://www.Bribes.org/perl/ppm For the Perl 5.10 branch: Name Location BioPerl-Regular Releases http://bioperl.org/DIST Kobes http://cpan.uwinnipeg.ca/PPMPackages/10xx/ Bribes http://www.Bribes.org/perl/ppm Trouchelle http://trouchelle.com/ppm10/package.xml Select at the menu item “View” → “All Packages”. Enter at the "magnifying glass symbol" entry field the module names, select them, and start the installation by selecting menu item → Action → Install. Current suggested modules are: MySQL database support: DB_File v 1.816 DBI v 1.604 (preinstalled at Perl 5.10) DBD-mysql v 4.005 (for 5.10 Kobes repository) Data-Table v 1.54 BioPerl (BioPerl, Kobes and Bribes repositories) bioperl v 1.5.2_100 BioPerl package bioperl-db v 1.5.2_100 BioPerl database packages bioperl-network v 1.5.2_100 BioPerl pathway packages bioperl-run v 1.5.2_100 BioPerl application packages Only for Perl 5.8 series (not recommended): bioperl v 1.2.3 BioPerl bioperl-gui v 0.7 BioPerl graphical user interface Graphics support GD v 2.39 (preinstalled in Perl 5.10.1003) Support for graphical user interfaces (GUI) and Windows system calls Win32-API v 0.55 (not preinstalled in Perl 5.8) Win32-GUI v 1.06 Tk v 804.028 (not preinstalled in Perl 5.10) Excel Spreadsheet support Spreadsheet-ParseExcel v0.32 Perl Excel file reader Perl Installation Jul-2008 4 Perl Installation Bioinformatics II - Tools for Functional Genomics Spreadsheet-ParseExcel-Simple v1.04 Perl Excel file reader Spreadsheet-ParseExcel_XHTML v1.04 Perl Excel XHTML file reader Spreadsheet-WriteExcel v2.21 Perl Excel file writer (for 5.10 Trouchelle) SOAP protocol support for internet connection to SOAP services SOAP-Lite v 0.69 Web service package You can always visit, verify and update module installations using ppm. Checking the installed version of BioPerl A version number can be called by a "one-liner", a Perl command which is typed or copied into one line of the Windows cmd terminal: The Linux version is found at the BioPerl FAQ internet page: http://www.bioperl.org/wiki/FAQ#How_can_I_tell_what_version_of_BioPerl_is_installed.3F perl -MBio::Root::Version -e 'print $Bio::Root::Version::VERSION,"\n"' For the Windows cmd terminal the single quotes enclosing the red labelled executable command must be changed to double quotes ' → ", and the double quotes around the line break symbol "\n" must be escaped by back slashes: \"\n\". The modified one-liner for Windows reads: perl -MBio::Root::Version -e "print $Bio::Root::Version::VERSION,\"\n\"" Click on the "Start" tab of the Windows main window, select the "Run" option and type "cmd" in the prompted entry field. In the cmd window right-click onto the "C:\"- symbol in the left upper corner of the window and select the menu item "Edit" → "Paste" and insert the one-liner modified for Windows and press "Enter". The Perl interpreter should return the installed BioPerl version: "1.0050021" (= version 1.5.21). The subversions are separated by several zeros (00). 3. Executing Perl scripts Run a script by double clicking on it: A convenient way is to start a Perl script by double clicking on its file using Windows Explorer. It should be shown with a gecko symbol and has always the ending ".pl". You can also make a desktop link to a script, you may use often. This will allow the script to ask for programmed parameters, run the script job and close again the script window.
Recommended publications
  • EGTDC Perl Course 2004
    EGTDC Perl Course 2004 Making use of CPAN modules Perl on other platforms Tim Booth : [email protected] Environmental Genomics Thematic Programme Data Centre http://envgen.nox.ac.uk CPAN Recap • "Comprehensive Perl Archive Network". • Holds virtually every Perl module, among other things. • Access via the web (http) and by the CPAN shell. – search.cpan.org is probably your first point of call. • Most modules are standardised to make them easy to use right away: – Documentation in ©perldoc© format. – Standard installation procedure – Self-testing Environmental Genomics Thematic Programme Data Centre http://envgen.nox.ac.uk CPAN and modules • CPAN contains around 2860 modules - bits of code that can be plugged into your scripts. Some are small, some complex. • Need to interface with a database? Use the DBI/DBD modules. • Need to make webpages with Perl? Use the CGI module. • Need to make a graphical interface? Use the Tk module. • Need to do bioinformatics? Use the BioPerl modules! • To use an installed module you "use module_name;" in the same way as you "use strict;" • Modules can be installed in 2 ways – Manually, from source – From CPAN, using the CPAN shell. Environmental Genomics Thematic Programme Data Centre http://envgen.nox.ac.uk Installing modules from source • On Bio-Linux, log in as manager to install modules system-wide • Modules are distributed as .tar.gz files. • Download the module to the manager©s home directory. • if you are missing components required for the module to work you will be told at the 2nd step below. • Always check README or INSTALL files before installing.
    [Show full text]
  • Learning Perl. 5Th Edition [PDF]
    Learning Perl ,perlroadmap.24755 Page ii Tuesday, June 17, 2008 8:15 AM Other Perl resources from O’Reilly Related titles Advanced Perl Programming Perl Debugger Pocket Intermediate Perl Reference Mastering Perl Perl in a Nutshell Perl 6 and Parrot Essentials Perl Testing: A Developer’s Perl Best Practices Notebook Perl Cookbook Practical mod-perl Perl Books perl.oreilly.com is a complete catalog of O’Reilly’s books on Perl Resource Center and related technologies, including sample chapters and code examples. Perl.com is the central web site for the Perl community. It is the perfect starting place for finding out everything there is to know about Perl. Conferences O’Reilly brings diverse innovators together to nurture the ideas that spark revolutionary industries. We specialize in document- ing the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches. Visit conferences.oreilly.com for our upcoming events. Safari Bookshelf (safari.oreilly.com) is the premier online refer- ence library for programmers and ITprofessionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or sim- ply flip to the page you need. Try it today with a free trial. main.title Page iii Monday, May 19, 2008 11:21 AM FIFTH EDITION LearningTomcat Perl™ The Definitive Guide Randal L. Schwartz,Jason Tom Brittain Phoenix, and and Ian brian F. Darwin d foy Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo Learning Perl, Fifth Edition by Randal L.
    [Show full text]
  • Abkürzungs-Liste ABKLEX
    Abkürzungs-Liste ABKLEX (Informatik, Telekommunikation) W. Alex 1. Juli 2021 Karlsruhe Copyright W. Alex, Karlsruhe, 1994 – 2018. Die Liste darf unentgeltlich benutzt und weitergegeben werden. The list may be used or copied free of any charge. Original Point of Distribution: http://www.abklex.de/abklex/ An authorized Czechian version is published on: http://www.sochorek.cz/archiv/slovniky/abklex.htm Author’s Email address: [email protected] 2 Kapitel 1 Abkürzungen Gehen wir von 30 Zeichen aus, aus denen Abkürzungen gebildet werden, und nehmen wir eine größte Länge von 5 Zeichen an, so lassen sich 25.137.930 verschiedene Abkür- zungen bilden (Kombinationen mit Wiederholung und Berücksichtigung der Reihenfol- ge). Es folgt eine Auswahl von rund 16000 Abkürzungen aus den Bereichen Informatik und Telekommunikation. Die Abkürzungen werden hier durchgehend groß geschrieben, Akzente, Bindestriche und dergleichen wurden weggelassen. Einige Abkürzungen sind geschützte Namen; diese sind nicht gekennzeichnet. Die Liste beschreibt nur den Ge- brauch, sie legt nicht eine Definition fest. 100GE 100 GBit/s Ethernet 16CIF 16 times Common Intermediate Format (Picture Format) 16QAM 16-state Quadrature Amplitude Modulation 1GFC 1 Gigabaud Fiber Channel (2, 4, 8, 10, 20GFC) 1GL 1st Generation Language (Maschinencode) 1TBS One True Brace Style (C) 1TR6 (ISDN-Protokoll D-Kanal, national) 247 24/7: 24 hours per day, 7 days per week 2D 2-dimensional 2FA Zwei-Faktor-Authentifizierung 2GL 2nd Generation Language (Assembler) 2L8 Too Late (Slang) 2MS Strukturierte
    [Show full text]
  • Mojolicious Web Clients Brian D Foy Mojolicious Web Clients by Brian D Foy
    Mojolicious Web Clients brian d foy Mojolicious Web Clients by brian d foy Copyright 2019-2020 © brian d foy. All rights reserved. Published by Perl School. ii | Table of contents Preface vii What You Should Already Know . viii Some eBook Notes ........................... ix Installing Mojolicious ......................... x Getting Help .............................. xii Acknowledgments . xiii Perl School ............................... xiv Changes ................................. xiv 1 Introduction 1 The Mojo Philosophy .......................... 1 Be Nice to Servers ........................... 4 How HTTP Works ........................... 6 Add to the Request ........................... 15 httpbin ................................. 16 Summary ................................ 18 2 Some Perl Features 19 Perl Program Basics .......................... 19 Declaring the Version ......................... 20 Signatures ................................ 22 Postfix Dereference ........................... 25 Indented Here Docs ........................... 25 Substitution Returns the Modified Copy . 26 Summary ................................ 27 3 Basic Utilities 29 Working with URLs .......................... 30 Decoding JSON ............................. 34 Collections ............................... 45 Random Utilities ............................ 50 TABLE OF CONTENTS | iii Events .................................. 52 Summary ................................ 55 4 The Document Object Model 57 Walking Through HTML or XML ................... 57 Modifying
    [Show full text]
  • Pro Perl Parsing
    5041fmfinal.qxd 7/1/05 1:00 PM Page i Pro Perl Parsing Christopher M. Frenz 5041fmfinal.qxd 7/1/05 1:00 PM Page ii Pro Perl Parsing Copyright © 2005 by Christopher M. Frenz Lead Editors: Jason Gilmore and Matthew Moodie Technical Reviewer: Teodor Zlatanov Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Tony Davis, Jason Gilmore, Jonathan Hassell, Chris Mills, Dominic Shakeshaft, Jim Sumser Associate Publisher: Grace Wong Project Manager: Beth Christmas Copy Edit Manager: Nicole LeClerc Copy Editor: Kim Wimpsett Assistant Production Director: Kari Brooks-Copony Production Editor: Laura Cheu Compositor: Linda Weidemann, Wolf Creek Press Proofreader: Nancy Sixsmith Indexer: Tim Tate Artist: Wordstop Technologies Pvt. Ltd., Chennai Cover Designer: Kurt Krames Manufacturing Manager: Tom Debolski Library of Congress Cataloging-in-Publication Data Frenz, Christopher. Pro Perl parsing / Christopher M. Frenz. p. cm. Includes index. ISBN 1-59059-504-1 (hardcover : alk. paper) 1. Perl (Computer program language) 2. Natural language processing (Computer science) I. Title. QA76.73.P22F72 2005 005.13'3--dc22 2005017530 All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. Printed and bound in the United States of America 987654321 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.
    [Show full text]
  • A DBA and Developers Best (Forgotten) Friend Beginners Guide to Perl
    Perl A DBA and Developers best (forgotten) friend Beginners guide to Perl Avisit Solutions Limited Creators of Dbvisit – Protection Recovery Continuity Introducing myself – Arjen Visser Founder and CEO of Avisit Solutions Limited in New Zealand The creators of: Dbvisit – Standby Database Technology (Data Guard alternative) Leading software solution providing Oracle Disaster Recovery. Dbvisit is used world-wide. Customers and sectors include: - Kellogg’s - Alcatel-Lucent - Oklahoma State Bureau of Investigation - New York Blood Centre - Banking/Financials industry - Healthcare - Government and City Councils - Manufacturing See www.dbvisit.com for more information. Agenda • What makes Perl so great • What can I use Perl for / what not to use Perl for • CPAN • Brief language overview • Making Perl portable • Perl and Oracle • Best way to learn Perl • Small Perl project to take away What is not covered • Perl language in depth • OO Perl • Perl comparison to Python, Ruby etc. Brief history One of the most portable languages around. Larry Wall created Perl in 1987 while working at Unisys. Motivation was because awk did not have the functionality he required. Originally called Pearl. Perl 5 was rewrite and released on October 17, 1994 and included: - objects - references - modules Current version is 5.10. (even numbers for production releases) Future – Perl 6 will run on a cross-language virtual machine called Parrot. Both Python and Perl will run on Parrot. What makes Perl so great Perception that is not as current as python, ruby, java etc… Only a perception because: . Oracle uses it in 11g. • asmcmd is written in Perl • Perl executable and libraries are standard installed with Oracle (also on Windows) .
    [Show full text]
  • Strembed-4 Users' Manual Embedding Design Structures in Engineering Information
    School of somethi ng faculty of other StrEmbed-4 Users' Manual Embedding design structures in engineering information Hau Hing Chau 13 July 2017 Version 4E What is StrEmbed-4? Structure Embedding version 4 (StrEmbed-4) is a deliverable from the Embedding Design Structures in Engineering Information project, a Design The Future project funded by Engineering and Physical Sciences Research Council (grant reference EP/N005694/1). Engineers use design structures, such as Bills of Materials (BoMs), to tailor product definitions, including shape, for particular activities. For example, an engineering BoM defines the as-designed product whereas a manufacturing BoM defines the as-built state of the same product and a service BoM includes information on how the product has been maintained. All of these BoMs relate to the same designed product. However in practice, because of restrictions arising from current computer aided design technologies and associated business systems, different BoMs are usually related to separate digital definitions of the same product. This creates significant data management problems that add cost, time and rework into product development processes. If resolved, substantial business benefits, through improved efficiency and effectiveness of product development processes, could be achieved. StrEmbed-4 demonstrates how a design structure, for example “as designed”, typically using a computer aided design (CAD) system can be embedded on to a corresponding hypercube lattice. This embedding relationship can be shown visually with this software. Any combinations or permutations of an alternative design structure is also embedded in this hypercube lattice. Modified design structure can be exported to a data format that can be read by a CAD system.
    [Show full text]
  • Beginning Perl
    ffirs.indd ii 8/9/12 2:02 PM BEGINNING PERL INTRODUCTION . xxiii CHAPTER 1 What Is Perl? . .1 CHAPTER 2 Understanding the CPAN . 25 CHAPTER 3 Variables . .41 CHAPTER 4 Working with Data . 83 CHAPTER 5 Control Flow . 125 CHAPTER 6 References . 157 CHAPTER 7 Subroutines . 175 CHAPTER 8 Regular Expressions . 219 CHAPTER 9 Files and Directories . 249 CHAPTER 10 sort, map, and grep . 287 CHAPTER 11 Packages and Modules . 315 CHAPTER 12 Object Oriented Perl . 353 CHAPTER 13 Moose . 399 CHAPTER 14 Testing . 439 CHAPTER 15 The Interwebs . 481 CHAPTER 16 Databases . 523 CHAPTER 17 Plays Well with Others. 545 CHAPTER 18 Common Tasks . 567 CHAPTER 19 The Next Steps . .611 APPENDIX Answers to Exercises . 655 INDEX . 695 ffirs.indd i 8/9/12 2:02 PM ffirs.indd ii 8/9/12 2:02 PM BEGINNING Perl ffirs.indd iii 8/9/12 2:02 PM ffirs.indd iv 8/9/12 2:02 PM BEGINNING Perl Curtis “Ovid” Poe John Wiley & Sons, Inc. ffirs.indd v 8/9/12 2:02 PM Beginning Perl Published by John Wiley & Sons, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 w w w.wiley.com Copyright © 2012 by John Wiley & Sons, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-1-118-01384-7 ISBN: 978-1-118-22187-7 (ebk) ISBN: 978-1-118-23563-8 (ebk) ISBN: 978-1-118-26051-7 (ebk) Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600.
    [Show full text]
  • Spamassassin
    < Day Day Up > • Table of Contents • Index • Reviews • Reader Reviews • Errata • Academic SpamAssassin By Alan Schwartz Publisher: O'Reilly Pub Date: July 2004 ISBN: 0-596-00707-8 Pages: 256 Sys admins can field scores of complaints and spend months testing software suites that turn out to be too aggressive, too passive, or too complicated to setup only to discover that SpamAssassin (SA), the leading open source spam-fighting tool, is free, flexible, powerful, highly-regarded, and remarkably effective. The drawback? Until now, it was SpamAssassin's lack of published documentation. This clear, concise new guide provides the expertise you need to take back your inbox. "Detailed, accurate and informative--recommended for spam-filtering beginners and experts alike." -- Justin Mason, SpamAssassin development team < Day Day Up > < Day Day Up > • Table of Contents • Index • Reviews • Reader Reviews • Errata • Academic SpamAssassin By Alan Schwartz Publisher: O'Reilly Pub Date: July 2004 ISBN: 0-596-00707-8 Pages: 256 Copyright Preface Scope of This Book Versions Covered in This Book Conventions Used in This Book Using Code Examples Comments and Questions Acknowledgments Chapter 1. Introducing SpamAssassin Section 1.1. How SpamAssassin Works Section 1.2. Organization of SpamAssassin Section 1.3. Mailers and SpamAssassin Section 1.4. The Politics of Scanning Chapter 2. SpamAssassin Basics Section 2.1. Prerequisites Section 2.2. Building SpamAssassin Section 2.3. Invoking SpamAssassin with procmail Section 2.4. Using spamc/spamd Section 2.5. Invoking SpamAssassin in a Perl Script Section 2.6. SpamAssassin and the End User Chapter 3. SpamAssassin Rules Section 3.1. The Anatomy of a Test Section 3.2.
    [Show full text]
  • Learning Perl.Pdf
    www.it-ebooks.info www.it-ebooks.info Download from Wow! eBook <www.wowebook.com> Learning Perl www.it-ebooks.info www.it-ebooks.info www.it-ebooks.info SIXTH EDITION Learning Perl Randal L. Schwartz, brian d foy, and Tom Phoenix Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo www.it-ebooks.info Learning Perl, Sixth Edition by Randal L. Schwartz, brian d foy, and Tom Phoenix Copyright © 2011 Randal L. Schwartz, brian d foy, and Tom Phoenix. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or [email protected]. Editor: Simon St.Laurent Indexer: John Bickelhaupt Production Editor: Kristen Borg Cover Designer: Karen Montgomery Copyeditor: Audrey Doyle Interior Designer: David Futato Proofreader: Kiel Van Horn Illustrator: Robert Romano Printing History: November 1993: First Edition. July 1997: Second Edition. July 2001: Third Edition. July 2005: Fourth Edition. July 2008: Fifth Edition. June 2011: Sixth Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Learning Perl, the image of a llama, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps.
    [Show full text]
  • Introduction to Perl
    Introduction to Perl Instructor: Dr. Nicholas C. Maliszewskyj Textbook: Learning Perl on Win32 Systems (Schwartz, Olson & Christiansen) Resources: Programming Perl (Wall, Christiansen, & Schwartz) Perl in a Nutshell (Siever, Spainhour, & Patwardian) Perl Mongers http://www.perl.org/ Comprehensive Perl Archive Network http://www.cpan.org · Initializing 1. Introduction · Looping over elements · History & Uses · Sorting · Philosophy & Idioms · Resources 9. Pattern Matching · Regular expressions 2. Perl Basics · Matching and substitution · Script Naming · Atoms and assertions · Language Properties · Invocation 10. Subroutines and Functions · Structure & Invocation 3. Built-In Data Types · Parameter passing · Scalars, lists, & hashes · Scope · Variable contexts · Special variables (defaults) 11. Files and I/O · Understanding filehandles 4. Scalars · Predefined filehandles · Numbers (STDIN, STDOUT, STDERR) · Strings · Opening, closing, reading, writing 5. Basic Operators · Formats · Manipulating files · Types of operators · Operator precedence 12. Modules 6. Control Structures · Extending Perl functionality · Obtaining and installing · If-elsif-else, unless · Object-oriented Perl · Loops: do, while, until, for, foreach 13. CGI Programming · Labels: next, last · CGI Concepts · The infamous goto · Generating HTML 7. Lists · Passing parameters · Simple Forms · Initializing · Using the CGI.pm module · Accessing elements · Special operators 14. Advanced Topics 8. Associative Arrays (Hashes) · To be determined · Keys and values 1 Introduction What is Perl? Depending on whom you ask, Perl stands for “Practical Extraction and Report Language” or “Pathologically Eclectic Rubbish Lister.” It is a powerful glue language useful for tying together the loose ends of computing life. History Perl is the natural outgrowth of a project started by Larry Wall in 1986. Originally intended as a configuration and control system for six VAXes and six SUNs located on opposite ends of the country, it grew into a more general tool for system administration on many platforms.
    [Show full text]
  • Learning Perl MAKING EASY THINGS EASY and HARD THINGS POSSIBLE
    7th Edition Learning Perl MAKING EASY THINGS EASY AND HARD THINGS POSSIBLE Randal L. Schwartz, brian d foy & Tom Phoenix SEVENTH EDITION Learning Perl Making Easy Things Easy and Hard Things Possible Randal L. Schwartz, brian d foy, and Tom Phoenix Beijing Boston Farnham Sebastopol Tokyo Learning Perl by Randal L. Schwartz, brian d foy, and Tom Phoenix Copyright © 2017 Randal L. Schwartz, brian foy, and Tom Phoenix. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com/safari). For more information, contact our corporate/insti‐ tutional sales department: 800-998-9938 or [email protected]. Editor: Heather Scherer Indexer: Lucie Haskins Production Editor: Melanie Yarbrough Interior Designer: David Futato Copyeditor: Jasmine Kwityn Cover Designer: Karen Montgomery Proofreader: Sonia Saruba Illustrator: Rebecca Demarest October 2016: Seventh Edition Revision History for the Seventh Edition 2016-10-05: First Release 2018-03-02: Second Release See http://oreilly.com/catalog/errata.csp?isbn=9781491954324 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Learning Perl, the cover image, and related trade dress are trademarks of O’Reilly Media, Inc. While the publisher and the authors have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work.
    [Show full text]