Perl Course |
1-800-716-4324 |
|
San Francisco Bay Area |
Advanced Perl - San Francisco
This course examines three important topics: pattern matching, references, and database integration modules. Pattern matching is the identification of patterns of letters, numbers, or other characters in a string of letters. References are similar to "pointers" in C: they designate the location in memory where variable's value is stored. A good understanding of references is a prerequisite to comprehending the syntax of many powerful modules, including those that connect to databases and retrieve XML. In this course we will use ActiveState's distribution of Perl and its Perl code editor. Determining If a String Matches a Pattern Pattern matching is the parsing of a large paragraph of text and identification of parts of it that match a particular pattern. The pattern is designated using a "regular expression", a sequence of special symbols to represent word and character patterns. For example, your boss might ask you to sift through a huge text file with thousands of phone numbers and addresses, identifying only the international phone numbers in Mexico and Canada. Likewise, we'll start by seeing if particular patterns of text can be found in a long paragraph. Saving Matched Phrases and Subparts Once you can identify patterns in text, you can use variables to store either a list of the matches, or a list of subparts of each match. For example, if you were looking for email addresses in the sentence "San Francisco mayor's email is sfmayor@mayor.com or mayorsf@mayor.com", you could retrieve either an array of matches: ('sfmayor@mayor.com','mayorsf@mayor.com'), or the username part of each match: ('sfmayor','mayorsf'). Performing Substitutions for Matched Patterns You can choose to substitute one phrase for another matched phrase. In doing so, you can use parts of the match that have been 'memorized' and stored in special variables ($1, $2, $3, etc.). This course will show you how you can even run the matched phrase through a subroutine. Before long, you'll be able to turn any document into Pig Latin with one line of code! References "References" are special variables that refer the memory locations of the contents of other variables. Perl code that calls subroutines or module methods will often pass references to complex data structures as a reference, a single argument that points to a complex data structure located in memory. It is also possible to create "on the fly" references to arrays and hashes without assigning the reference to a variable name; these are called "anonymous references", and we'll explain how to identify and create them. Finally, this course will show you how to "dereference" a reference, to get at the data at which the reference points. Why would you need to know this? References are commonly used to pass arguments to module subroutines. Managing Your Modules with CPAN and PPM Assuming that you have control over the computer where your scripts are located, we'll show you how to manage the modules on it. From finding the appropriate modules you need, to querying for existing modules, to downloading and installing new modules, you'll see how to take advantage of these powerful tools. For Perl on Unix, we'll examine the www.cpan.org web site to get a comprehensive list of available modules, and we'll examine a particular module that allows you to query and install other modules. On Windows, we'll run the ActiveState Perl Package Manager ("PPM") to see what modules are already installed, and how to install new ones from the ActiveState web site (www.activestate.com). Object-Oriented Code with Modules Many modules offer an object-oriented approach to calling their subroutines. This course will explain the object-oriented methodology you hear about so often in programming. You'll see how to create new objects and run their associated subroutines, known as "methods". As an example, we'll use the Net::FTP module to create a new FTP client object and automate the backups of some remote files on another server. Database Queries with DBI and DBD The DBI and DBD Perl modules allow a programmer to retrieve, update, delete, and insert records into database tables. DBI stands for "Database Independent", and this module has a set of subroutines that can be called on any particular database. The DBD module, in contrast, means "Database Dependent"; you can think of this as the driver for a particular database. This course will show you how to connect to several databases using some commands from an easy-to-learn language called "Structured Query Language" (SQL). You'll see how to connect to the following databases:
Updating and Inserting Table Rows Just querying a database to see what's inside isn't good enough. We'd like to actually change the contents of a table, either updating existing rows, or inserting new rows. You'll see how to take user input from the keyboard and insert it into a table. Outputting a Recordset as XML Finally, this course will show you how to use the DBIx::XML_RDB module to take a recordset from MS Access and output it as XML. This has the benefit of turning a simple database into a real database server that can be queried from across the web with the help of a web server and some Perl scripts. Prerequisites:
keywords: perl training san francisco bay area (Perl Introduction) perl classes san francisco bay area (Perl Intermediate), |
Newsletter subscribers can win $100 credit!
Home | Course Catalog | Schedule | About Us | Contact Us | Extras | Sitemap | Package Rates | Shopcart