Vip <> wrote:
> I have this problem to solve but i don't know how!
>
> Develop a Perl program that receives as argument on the command line
> the name of a file in the working directory (containing one DNA
> sequence in FASTA format) and prints the content of the file with the
> whole sequence in uppercase character.
> -It checks the number of arguments received on the command line and if
> the number is not 1 it prints an error message and exits.
Homework? And what have you tried so far?
> Can anyone tell me how to develop this fuctions with perl?
- Check the number of elements in the command line arguments
array @ARGV, if it's not 1 print an error message and exit.
- Use the open() function to open the file using the first
element of the argument array.
- Read it in line by line (using the '<>' operator) and
- if it's a line with a DNA sequence use the uc() function to
convert all characters to upper case (read the specification
of the FASTA format to figure out how these lines are diffe-
rent from description lines - seems to be trivial)
- print out the line.
- Close the file using the close() function.
Regards, Jens
--
\ Jens Thoms Toerring ___
\__________________________
http://toerring.de