#!/usr/bin/perl -w
# read protein sequence from file and print it

# Read filename & remove newline from string
print "Type name of protein file: ";
$protFile = <STDIN>; chomp $protFile;

# First we have to "open" the file
unless (open(PROTEINFILE, $protFile)) {
	print "File $protFile doesnot exist"; exit;}

# Read protein sequence data into array @protein
@protein = <PROTEINFILE>;

# Print the protein onto the screen
print @protein;
print "File contained ", scalar @protein, " lines\n";

# Print line #3 and number of lines
print "Line #3 contained: ", $protein[2]; 

# Close the file.
close PROTEINFILE;

exit;

