{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

perl_intro - Introduction to Perl What is Perl What's Perl...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to Perl 1 Introduction to Perl Source: http://www.domtools.com/svcs/training/perl-intro/slides What is Perl? Perl is a High-level Scripting language Compiles at run-time Available for Unix, PC, Mac Best Regular Expressions on Earth What’s Perl Good For? Quick scripts, complex scripts Parsing & restructuring data files CGI-BIN scripts High-level programming Networking libraries Graphics libraries Database interface libraries BIOINFORMATICS !!! Perl Basics Comment lines begin with: # First line should look like: #!/bin/perl File Naming Scheme filename .pl (programs) filename .pm (modules) Example prog: print “Hello, World!\n”; Perl Basics Statements must end with semicolon $a = 0; Should call exit() function when finished Exit value of zero means success exit (0); # successful Exit value non-zero means failure exit (2); # failure Data Types Integer 25 750000 1_000_000_000 8#100 16#FFFF0000 Floating Point 1.25 50.0 6.02e23 -1.6E-8 String ‘hi there’ “hi there, $name” qq(tin can) print “Text Utility, version $ver\n”;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon