6.Perl
We'll introduce Perl here. If you have no previous experience on either Perl or Python, we would recommend Python for you.
Teaching Video: Week III.5.Perl
1) Install Perl Modules
Install CPAN: How to install CPAN modules
Install modules with cpan
usually you start cpan in your shell:
# cpan
and type
install Statistics::Basic
install Statistics/LineFit.pm
install Math/Cephes.pm
or in short form:
cpan install Statistics::Basic
cpan install Statistics/LineFit.pm
cpan install Math/Cephes.pm
Recommended Modules
Bioperl : installation guide
Statistics::Basic
2) Examples
My Perl Scripts at github , for instance:
seqmanipulator.pl
snp.pl
TFtargets.pl
export_intron.pl
siRNA-filter-NAR2008.pl
3) Tips
Perl in command line
Syntax checking
perl -cw *.pl
Add perl5lib
in .bashrc:
export PERL5LIB=/home/john/my_perl_lib:/CVS/my_perl_lib
The state of a file
In a subroutine
my $a = @_;
is illegal to read the input. Must add ( ) to the variable, so it should be
my ($a) = @_;
4) Homework for Perl
Try to run my favorite Perl scripts and install the modules needed.
5) Video
Last updated