Dive Into Perl

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites

    Dive Into Perl - Presentation Transcript

    1. Dive into Perl Ralph Wen Ralph.Wen@gmail.com 4/9/2009
    2. while (<>) { print “welcome!\\n” if /perl/; }
    3. #!/usr/bin/perl $_=' dw`m !#cholned!]y z42|]yz45|]yz55|]yz 5g|]yz44|]yz45|-&;tug9& #:lx)L%j-%h-%k-%s-%y-%x(:g ns%x)X, 04//05(zgns%y)1//68(zqshou# ]dZ#-%j\\'04?6 >0;1-#:2#- %j$6-#l]yz372`|#:  gns)%h<%j<%s<1:%k<%s+%s,%h+%h,3*%y.34-%h<3+%s+%h* %x.01-%k+REKCAHX%k*%hJUST+%h=00\\'ANOTHER\\' %jPERL* *=000:%s<%k(zqshouHACKER##: |||qshou#]dZ1l#:';s<\\s+> <>gme;y/\\101-\\130//d; s/(.)/chr(ord($1 )^0x1)/ge; eval ;qaa
    4. So what is Perl?
    5. Perl is… • A pearl without the ‘a’ • A computer language (Perl) • A interpreter (perl) • Pathologically Eclectic Rubbish Lister • Practical Extraction and Report Language • …but never PERL
    6. What’s Perl used for? • Text processing • System administration • CGI and web programming • Database interaction • … and, test automation!
    7. What is Perl like?
    8. What is Perl like? • High level • General purpose • Interpreted • Dynamic • Fast • Open source • Mature…
    9. Perl’s “philosophy” • Scripting, programming, hacking and coding • There's more than one way to do it • Pandora's box • Knowledge socialism • ..and, this guy is the philosopher!
    10. Okay, now let’s dive into Perl!
    11. Hello World! print ‘hell!’
    12. Hello again! #!/usr/bin/perl use strict; use warnings; my $greeting = “Hello Earth!\\n”; print $greeting; exit;
    13. Hello? Hello/World.pm hello_world.pl package Hello::World; #!/usr/bin/perl use strict; use Hello::World; use warnings; print hello(); our $VERSION = ‘1.00’; print hello(\"Milky Way\"); use base ‘Exporter’; =head1 NAME Hello::World - an encapsulation for hello world =cut sub hello { my $target=shift; $target=‘world’ unless defined $target; return “Hello, $target!”; } 1;
    14. Just show me the gory details!!
    15. Well, get ready! It’s a long and harsh journey!
    16. But we’ll be running out of time.. So..
    17. You are encouraged to learn the syntax by yourself!
    18. Demo – Finding Duplicate Files* • Source code (link) • Demo Video (link) *Courtesy to “Wicked Cool Perl Scripts” by Steve Oualline. For more examples please read this book.
    19. Somebody said Perl sucks? • Ugly • Illegible syntax • Hard to maintain • Lack of method signatures • Not a real OOPL For more into refer to What's wrong with Perl?
    20. When to use Perl for us? • Processing test results • Installing recurrent builds • Performing repetitive test steps • Integrating different tests • ..and so on and so forth
    21. Want more fun with Perl?
    22. Online tutorials • perlintro – http://perldoc.perl.org/perlintro.html • perltut – http://perldoc.perl.org/index-tutorials.html • A quick tutorial in Chinese – http://www.cbi.pku.edu.cn/chinese/documents/perl/index.htm
    23. Books
    24. • Comprehensive Archive Networks • Hosts over 15,400 Perl modules • Has more than 250 mirrors across the world • One-click-install for modules for almost all imaginable tasks
    25. User Communities • PerlMonks: – http://www.perlmonks.org/ • use Perl; – http://use.perl.org/ • Perl Mongers: – http://www.pm.org/ • Perl China – http://bbs.perlchina.org/

    + Ralph WenRalph Wen, 7 months ago

    custom

    580 views, 2 favs, 1 embeds more stats

    A brief intro for Perl. Basic knowledge of programm more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 580
      • 561 on SlideShare
      • 19 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 0
    Most viewed embeds
    • 19 views on http://www.abluetiger.com

    more

    All embeds
    • 19 views on http://www.abluetiger.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Tags