Pro Perl

By Peter Wainwright

*Condensed, readable variety; offers large worth in precisely one e-book. This e-book bargains *THE source for targeted and pragmatic commercial strategies in Perl, whereas the competing *best-sellers are older, quirkier and shallower remedies of Perl.

*Thorough dialogue of Perl―from installations to purposes improvement; excellent for operating Perl programmers in 2005.

*Wainwright is a revered Perl professional and writer of industry-respected seasoned Apache title.

Show description

Preview of Pro Perl PDF

Best Computers books

UML: A Beginner's Guide

Crucial abilities for first-time programmers! This easy-to-use ebook explains the basics of UML. you are going to learn how to learn, draw, and use this visible modeling language to create transparent and powerful blueprints for software program improvement tasks. The modular technique of this series--including drills, pattern tasks, and mastery checks--makes it effortless to benefit to exploit this robust programming language at your individual velocity.

The Linux Programmer's Toolbox

Grasp the Linux instruments that would Make You a extra effective, powerful Programmer The Linux Programmer's Toolbox is helping you faucet into the sizeable number of open resource instruments to be had for GNU/Linux. writer John Fusco systematically describes the main helpful instruments on hand on so much GNU/Linux distributions utilizing concise examples that you should simply adjust to fulfill your wishes.

Advanced Visual Basic 2010 (5th Edition)

Within the 5th variation, complex visible simple 2010 is helping people who find themselves acquainted with the basics of visible uncomplicated 2010 programming harness its strength for extra complex makes use of. assurance of refined instruments and strategies utilized in the this present day contain quite a few database, ASP. internet, LINQ, WPF and net providers subject matters.

Bayesian Methods for Hackers: Probabilistic Programming and Bayesian Inference (Addison-Wesley Data & Analytics)

Grasp Bayesian Inference via functional Examples and Computation–Without complex Mathematical research   Bayesian equipment of inference are deeply ordinary and intensely strong. in spite of the fact that, so much discussions of Bayesian inference depend upon intensely advanced mathematical analyses and synthetic examples, making it inaccessible to a person with no robust mathematical heritage.

Extra resources for Pro Perl

Show sample text content

See “Regular Expressions” in bankruptcy eleven) if any parentheses have been used; it returns undef if the fit failed. In scalar context, this can be switched over to a count number of the parentheses, that's a real worth for the needs of conditional expressions. The ! ~ operator plays a logical negation of the again worth for conditional expressions, that's, 1 for failure and " for achievement in either scalar and checklist contexts. # search for 'pattern' in $match textual content, print message if absent print "Not chanced on" if $match_text ! ~ /pattern/; Comma and courting Operators We use the comma operator forever, frequently with no noticing it. In a listing context it easily returns its left- and right-hand part as components of the record. @array = (1, 2, three, 4); mysubroutine(1, 2, three, 4); # build an inventory with commas # ship a listing of values to 'mysubroutine'. In a scalar context, the checklist operator returns the worth of the right-hand aspect, ignoring no matter what result's back by way of the left: go back 1, 2, three, four; # returns the worth '4'; the connection or digraph operator will be regarded as an clever comma. It has a similar which means because the comma operator yet is meant to be used in defining key-value pairs for hash variables. It additionally permits barewords for the keys. # outline a hash from a listing, yet extra legibly %hash = ('Tom'=>'Cat', 'Jerry'=>’Mouse', 'Spike'=>'Dog'); # outline a hash from a listing with barewords %hash = (Tom=>'Cat', Jerry=>'Mouse', Spike=>'Dog'); either operators bind much less strongly than an project. within the following expression, $a is assigned the worth 1, and $b is assigned the worth 2: $b=($a=1,2) ninety seven 98 bankruptcy four ■ OPERATORS We’ll go back to either those operators after we come to lists, arrays, and hashes in bankruptcy five. Reference and Dereference Operators The reference \ is a unary operator that creates and returns a reference for the variable, price, or subroutine that follows it. changes to the worth pointed to by way of the reference switch the unique worth. $number = forty two; $numberref = \$number; $$numberref = 6; print $number; # screens '6' To dereference a reference (that is, entry the underlying value), we will be able to prefix the reference, a scalar, by way of the variable form of regardless of the reference issues to; within the previous instance now we have a connection with a scalar, so we use $$ to entry the underlying scalar. To dereference a listing, we might use @$, and to dereference a hash, %$. in view that this occasionally explanations priority difficulties whilst utilized in conjunction with indices or hash keys, we will be able to additionally explicitly dereference with curly braces. $number = $$numberref; $number = ${$numberref}; however, and sometimes extra legibly, we will use the dereference, or arrow operator. The arrow operator, ->, has meanings, reckoning on the character of its left-hand aspect. the 1st happens whilst the left-hand aspect is an array or hash reference, or whatever that returns one, akin to a subroutine. # lookup a hash key $value = $hashref -> {$key}; # take a slice of an array @slice = $arrayref -> [7.. 11]; # get first section of subroutine returning array reference: $result = sub_that_returns_an_arrayref() -> [0]; The arrow operator can be implicitly used every time we stack indices or hash keys jointly.

Download PDF sample

Rated 4.46 of 5 – based on 17 votes