Friday, April 15, 2016

Language: Perl rules.....

Turn on warnings, using use strict; use warnings;
Declare variables with 'my', to avoid collision.
3 datatypes: $ for a scalar,  @  for  an  array, %  for  a  hash
 arrays use square brackets [ ]; hashes use curly braces { }
 array  variable  @ARGV  contains   arguments
special variable $0 (a zero) has the name of the program
If no arguments are given, print a USAGE statement and exit.
passing arguments into subroutines is called 'pass  by  reference '
The push adds an element to the end of the @i array
The shift removes the first element from the  @j  array
Using  randomization,  it's  possible  to  simulate  and  investigate  the  mechanisms  of
mutations in DNA
Call srand to seed the random number generator before you call this function.
Nested braces need to be read and evaluated from the inside out.
Perl modules/libraries are used to load in subroutines (module has .pm extension)
use BeginPerlBioinfo;
$&  is  a  special variable that's set after a successful regular-expression match

No comments:

Post a Comment