Perl For Beginners Massachusetts Institute of Technology

Perl For Beginners Massachusetts Institute Of Technology-Free PDF

  • Date:28 Mar 2020
  • Views:77
  • Downloads:0
  • Pages:22
  • Size:1.22 MB

Share Pdf : Perl For Beginners Massachusetts Institute Of Technology

Download and Preview : Perl For Beginners Massachusetts Institute Of Technology

Report CopyRight/DMCA Form For : Perl For Beginners Massachusetts Institute Of Technology


What is PERL,Practical Extraction Reporting Language. General purpose programming language,Creation of Larry Wall 1987. Maintained by a community of developers,Free Open Source. www cpan org,Why use Perl, Perl is fast especially at common tasks in biology. file manipulation and pattern matching,Good at manipulating large data sets or.
performing the same task repeatedly,CGI module gives simple interface for delivering. dynamic web pages,DBI modules provide database independent. interface for Perl,Powerful easy to use modules for network. programming Web E Mail FTP etc,Scalars scalar variables and operations. Control blocks and conditions,Array array variables and array operations.
Tips and resources,The Basics,Text file using ordinary text editor nedit. Comments begin with a pound sign,Statements end with semi colon. White space independent,Case sensitive,Variables need not be declared or typed. Represent a single piece of data,Can represent string or numeric. 2 3 1456 1e 27 ATC NM 000327,Scalar Variables, Variable names consist of a dollar sign followed by a letter or.
underscore then followed by zero or more letters digits or. underscores,name old name, Used to hold results of calculations constants input from. keyboard files etc,acc number NM 000327,Numeric Operators. Addition subtraction,multiplication division,modulus exponentiation. c a b c equals 3,d c 2 d equals c to the power of 2 which is 9. e d 2 e equals the remainder of 9 2 which is 1,Numeric Comparison Operators.
equality inequality greater,than greater than or equal to less. than less than or equal to,String Operators,concatenation eq equality. ne inequality,b a World b equals Hello World,a eq Hello evaluates to true. a ne World also evaluates to true,Variable Interpolation. Variables are interpolated within double quotes,but not within single quotes.
hello a evaluates to hello student,hello a evaluates to hello a. New lines n tabs t and other special,characters interpolated within double quotes. print hello tstudent twelcome tto Boston n, prints tabs between each word and a trailing new line. Statements Blocks,Curly Braces surrounding multiple statements. this is a naked block,Statement 1,Statement 2,Naked block has no effect on program flow.
Blocks are typically part of a larger construct,Types while for foreach if else. if test expression,if elsif else,Statement 1,Statement 2. elsif test expression2,Statement 3,Statement 4, Statement 1 and 2 are executed if test expression is true Statement 3. is excuted if test expression2 is true otherwise statement 4 is executed. More on if else,Braces are required unlike other languages. else is optional,unless can be used instead of if which.
reverses the test,If more than two conditions exist use elsif. List of scalars,Can store heterogeneous information. No space allocation Expands as necessary,Ordered sequentially and indexed start at 0. Variable names start with,bases A T G C,0 1 2 3 index. Array Assignments,a 7 34 coffee tea 343,qw use white space to separate elements.
a qw 7 34 coffee tea 343,Can be made up of scalar and array variables. Why use Perl Perl is fast especially at common tasks in biology file manipulation and pattern matching Good at manipulating large data sets or performing the same task repeatedly CGI module gives simple interface for delivering dynamic web pages DBI modules provide database independent interface for Perl

Related Books