Hi,
I'm new to perl and have had some problems trying to create a module. can someone please tell me how i can create a module and use the functions in a .pl file? or redirect me to a site which has an online tutorial for me to follow in order to understand how to do it.
below is my module so far
package FSClient; #file: MySequence.pm use strict; my $EcoRI = 'ggatcc'; use base 'Exporter'; my @EXPORT = qw(reversec seqlen); my @EXPORT_OK = qw($EcoRI) sub reversec { my $sequence = shift; $sequence = reverse $sequence; $sequence =~ tr/gatcGATC/ctagCTAG/; return $sequence; } sub seqlen { my $sequence = shift; $sequence =~ s/[^gatcnGATCN]//g; return length $sequence; } 1;
i have got a lot of compile errors in the .pl file which i use to call this module.
thanks
Wijew
20050520 Edit by Corion: Changed title from 'Modules'
In reply to how to create Modules by dwijew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |