Stephen L. Kruc

Kruc . -First version released December 18.'s Jet Propulsion Labs.History -Perl was written by Larry Wall whilst working for NASA. 1987 Stephen L. -Started out as a language so that Larry could “stick” different tools together by converting between their various formats.

Kruc .-Version 5 is the latest release -Larry is still involved in the development but not as much as he was in the first three releases Stephen L.

System administration (quick) Common Gateway Interfaces (CGI) Has become popular for web use along with PHP ● ● ● ● ● Amazon Slashdot Stephen L. Kruc .Uses ● Helping modules talk across machine and language.

What it is ● ● Perl is a loose scripting language It is a Glue or Mortar language meant for “inbetween” FREE!!!!! Open source free . Kruc .) Based out of preexisting languages like awk and Pascal Utilizes regular expressions for communication ● ● ● Stephen L.

Kruc .Sebesta ● ● ● ● ● ● Readability Writability Data Paradigm Usage Orthoginality Simplicity Stephen L.

the ability to look through a piece of code and be able to see what is going on becomes difficult to see what's going on. ● ● There are many styles (some better than most) It all depends on the Author Stephen L. Kruc .PERL Evaluated ● Readability When a language becomes as broad and loose as PERL.

Kruc .PERL Evaluated ● Writability Loosely typed with a world of possibility. ● Syntax ● Data types – – – Scalar [$] Array [@] Hash [#] Through glorified references! (as ordained by Larry) ● Objects – Stephen L.

PERL Evaluated ● Paradigm Usage Spin the wheel and make your choice! ● No set pattern Stephen L. Kruc .

# nor. Kruc . With References # this works: push @$arrayref.. It can be easy to see it and at the same time there are times where things aren't as you though before. 1. Stephen L. of course. # this doesn't: $arrayref->push(1). does this: @$arrayref->push(1). With the Object # these are equivalent: $instance->push(1).PERL Evaluated ● Orthogonality PERL's orthogonality is hard to pin down. push $instance. 1.

Kruc ● ● ● ● ● . Pros Cons ● Loosely typed Large libraries Very powerful Over a dozen OS can run it ● HUGE language Ambiguous Ugly even with an experienced programmer Stephen L.PERL Evaluated ● Simplicity Perl is an easy language to get started in using common pieces of other languages and keeping everything in the author's hands.

print $guesses. my $selected=rand(scalar(@wordbank)). print "\n". $tries=0. my (@word)=split(//. @wordbank).@word). @guessed. print "Your hangman: ". +#as many words as you like. my ($miss. @build. @wordbank=qw(cubicle scramble deduction envelope century rediculous). Kruc . $guesses. print "Welcome to Hangman print "Word has ". $_=join(''. @build=("_") x scalar(@word). $miss=0.Example #!/usr/bin/perl -w use strict. $wordbank[$selected]). print scalar(@word). print " letters\n". $tries. print "Good luck! Start guessin`!\n". Stephen L. $guess. $guesses="0-<--<".

print substr($guesses. } else { $miss++.0. while (1) { last if $miss==length($guesses). } print "\n". chomp $guess. } } print "It took you $tries tries ($miss misses) and ". $index++) { $build[$index]=$word[$index] if ($word[$index] eq $guess). $miss. $index<scalar(@word).@word). if (m/$guess/) { print "right!\n". length($guesses)). $guess=lc(substr($guess. if ($miss < length($guesses)) { print "You made it!\n". $guess=<STDIN>. } . last if join(''.@build) eq join(''. $tries+=1. print "\n".1)).Hangman cont. } foreach my $letter (@build) { print "$letter ". } else { print "You failed.\n". for(my $index=0.

You get to decide what's next. Plans to adapt C++ functionality in 6th revision. .The Future of PERL Since it's beginning PERL has undergone several changes to adapt functionality with newer languages.

Opinion Very well documented and definitely usable. ● ● ● ● Backpocket Language I love RegEx!!! Time consuming Powerful! Stephen L. Kruc .

http://perldoc.http://www.html Get PERL – Windows OS ● ● Strawberry PERL .com/activeperl (free???) YOU ALREADY HAVE IT! ^_^ – UNIX/MAC OSX ● Stephen L. Kruc .perl.activestate. to get started Documentation .com/ (free) ActivePERL .

Sign up to vote on this title
UsefulNot useful