110 likes | 260 Views
Practical Getting started with Perl. Bioinformatics. Dr. Aladdin Hamwieh Khalid Al- shamaa Abdulqader Jighly. Aleppo University Faculty of technical engineering Department of Biotechnology. 2010-2011. Basics. Command Line Text File Inputs & Outputs Variables ($) " " and ' '
E N D
Practical • Getting started with Perl Bioinformatics Dr. Aladdin Hamwieh Khalid Al-shamaa Abdulqader Jighly Aleppo University Faculty of technical engineering Department of Biotechnology 2010-2011
Basics • Command Line • Text File • Inputs & Outputs • Variables ($) • " " and ' ' • New Line (;) • Comments (#)
First Code # first test print "hi everybody! \n"; print ‘Your name is:'; $name = <STDIN>; print "Hi $v"; exit 0;
Basic arithmetic operators • Operator Function + Addition - Subtraction * Multiplication / Division % Modulus (remainder) ** Exponent (to the power of) ++ Increment -- Decrement
Basic arithmetic operators • $v = 4; • $a = 2 + 3; • print "\$a = \$a \n"; • $a = $a -1; • $a -= 1; • $a--; • print "$a \n"; • $x = 2 + 3; • print '\$x = $x \n';
Note 12/3*4=16 BUT 12/(4*3)=1
order of precedence Operator ** / * % + -
Training • Input: • n • Output: • X
Homework X • Inputs: • Height (X) • Width (Y) • Outputs: • Perimeter • Area Y