Download E-books Intermediate Perl PDF

By Tom Phoenix, brian d foy

Perl is a flexible, robust programming language utilized in numerous disciplines, starting from procedure management to internet programming to database manipulation. One slogan of Perl is that it makes effortless issues effortless and difficult issues attainable. Intermediate Perl is ready making the bounce from the straightforward issues to the demanding ones.

Originally published in 2003 as Learning Perl gadgets, References, and Modules and revised and up to date for Perl 5.8, this publication bargains a gradual yet thorough creation to intermediate programming in Perl. Written by way of the authors of the best-selling Learning Perl, it choices up the place that booklet left off. themes include:

  • Packages and namespaces
  • References and scoping
  • Manipulating complicated facts structures
  • Object-oriented programming
  • Writing and utilizing modules
  • Testing Perl code
  • Contributing to CPAN

Following the profitable structure of Learning Perl, we designed every one bankruptcy within the ebook to be sufficiently small to be learn in precisely an hour or , finishing with a chain of routines that will help you perform what you might have discovered. to exploit the publication, you simply have to be conversant in the fabric in Learning Perl and feature ambition to move further.

Perl is a unique language to assorted humans. it's a fast scripting instrument for a few, and a fully-featured object-oriented language for others. it really is used for every thing from appearing fast international replacements on textual content records, to crunching large, advanced units of medical facts that take weeks to approach. Perl is what you are making of it. yet despite what you employ Perl for, this ebook is helping you do it extra successfully, successfully, and elegantly.

Intermediate Perl is ready studying to exploit Perl as a programming language, and never only a scripting language. this is often the e-book that turns the Perl dabbler into the Perl programmer.

Show description

Read Online or Download Intermediate Perl PDF

Similar Programming books

Working Effectively with Legacy Code

Get extra from your legacy platforms: extra functionality, performance, reliability, and manageability Is your code effortless to alter? are you able to get approximately on the spot suggestions for those who do swap it? Do it? If the reply to any of those questions isn't any, you've got legacy code, and it truly is draining money and time clear of your improvement efforts.

Clean Code: A Handbook of Agile Software Craftsmanship

Even undesirable code can functionality. but when code isn’t fresh, it may well carry a improvement association to its knees. each year, numerous hours and critical assets are misplaced due to poorly written code. however it doesn’t need to be that method. famous software program professional Robert C. Martin provides a progressive paradigm with fresh Code: A instruction manual of Agile software program Craftsmanship .

Implementation Patterns

“Kent is a grasp at developing code that communicates good, is straightforward to appreciate, and is a excitement to learn. each bankruptcy of this publication includes first-class factors and insights into the smaller yet vital judgements we constantly need to make while growing caliber code and periods. ” –Erich Gamma, IBM distinctive Engineer   “Many groups have a grasp developer who makes a swift movement of excellent judgements all day lengthy.

Agile Testing: A Practical Guide for Testers and Agile Teams

Te>Two of the industry’s so much skilled agile trying out practitioners and experts, Lisa Crispin and Janet Gregory, have teamed as much as carry you the definitive solutions to those questions and so on. In Agile trying out, Crispin and Gregory outline agile checking out and illustrate the tester’s function with examples from genuine agile groups.

Additional resources for Intermediate Perl

Show sample text content

Typically, the place we’ve noticeable the bareword filehandle we will be able to replacement the scalar variable filehandle reference: whereas( <$log_fh> ) { ... } if( −t $log_fh ) { ... } my $line = readline $log_fh; shut $log_fh; In any of those kinds, while the scalar variable is going out of scope (or we assign one other price to it), Perl closes the dossier. We don’t need to explicitly shut the dossier ourselves. Filehandles to Strings on the grounds that v5. 6, we will be able to open a filehandle to a connection with a scalar rather than to a dossier. That filehandle both reads from or writes to that string rather than a dossier (or pipe or socket). possibly we have to trap the output that may mostly visit a filehandle. If we open a write filehandle to a string and use that, the output by no means relatively has to go away our software and we don’t need to pull any stunts to trap it: open my $string_fh, '>', \ my $string; for example, shall we keep the kingdom of a CGI. pm software, yet we need to supply keep a filehandle. If we use our $string_fh, the knowledge by no means need to go away our application: use CGI; open my $string_fh, '>', \ my $string; CGI−>save( $string_fh ); equally, Storable shall we us pack info right into a string (see bankruptcy 6), yet nstore desires to put it aside to a named dossier, and nstore_fd will ship it to a filehandle. If we wish to catch it in a string, we use a string filehandle back: use Storable; open my $string_fh, '>', \ my $string; nstore_fd \@data, $string_fh; we will be able to additionally use filehandles to strings to catch output to STDOUT or STDERR for these pesky courses that are looking to muddle our displays. occasionally, we simply are looking to hold our courses quiet, and occasionally, we wish to redirect the output. the following, we need to shut STDOUT first then reopen the filehandle. when you consider that we often don’t are looking to lose the true STDOUT, we will localize it inside of a scope so our substitute has a constrained impression: word this type of trick won’t go the hot model of STDOUT to exterior courses via approach. print "1. This is going to the genuine typical output\n"; my $string; { neighborhood *STDOUT; open STDOUT, '>', \ $string; print "2. This is going to the string\n"; $some_obj−>noisy_method(); # this STDOUT is going to $string too } print "3. This is going to the genuine commonplace output\n"; we will layout our personal courses to be versatile in order that others can come to a decision the place to ship their info. If we allow them to specify the filehandle, they could come to a decision if the output is going right into a dossier, down a socket, or right into a string. the simplest a part of this adaptability is that the implementation is easy and an analogous for every of them: sub output_to_fh { my( $fh, @data ) = @_; print $fh @data; } If we wish to specialize output_to_fh, we need to wrap it to supply the perfect kind of filehandle: sub as_string { my( @data ) = @_; open my $string_fh, '>', \ my $string; output_to_fh( $string_fh, @data ); $string; } Processing Strings Line by way of Line after we can deal with a string as a dossier, many universal projects develop into a lot more straightforward seeing that we will be able to use the filehandle interface. examine, for example, breaking a multiline string into strains.

Rated 4.85 of 5 – based on 11 votes