110 likes | 273 Vues
This comprehensive guide is designed for newcomers to Perl in the context of bioinformatics. Authored by Dr. Aladdin Hamwieh, Khalid Al-shamaa, and Abdulqader Jighly from Aleppo University's Faculty of Technical Engineering, it covers essential topics such as command line usage, file inputs and outputs, variable handling, and basic arithmetic operations. The text includes practical examples, introductory code snippets, and a clear understanding of operator precedence, aimed at helping students become proficient in Perl for bioinformatics applications.
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