It looks to me like the line:

The filename of the file containing the protein sequence data

should instead be

# The filename of the file containing the protein sequence data

Nathan

On Mon, 2013-11-11 at 15:45 +0000, Alaba, Oluwafemi (IITA) wrote:
> Dear ALL, 
> 
> 
> I created a file named NM021964fragment.pep (using text editor) but I
> could not read that particular file.
> 
> 
> Here is the script I used:
> 
> 
> #!/usr/bin/perl -w
> #Reading protein sequence from a file
> 
> 
> The filename of the file containing the protein sequence data
> $proteinfilename = "NM021964fragment.pep";
> 
> 
> #First we have to 'open' the file and associate it a 'filehandle' with
> it. We choose the filehandle
> #PROTEINFILE for readability.
> 
> 
> open(PROTEINFILE, $proteinfilename);
> 
> 
> #now we do the actual reading of the protein sequence data from the
> file by using angle bracket < and >
> $protein = <PROTEINFILE>;
> 
> 
> close PROTEINFILE;
> 
> 
> print $protein;
> exit;
> 
> 
> 
> 
> Here is the output after running the program:
> 
> 
> Can't locate object method "sequence" via package "data" (perhaps you
> forgot to load "data"?) at readprotein.pl line 4.
> 
> 
> would be glad if somebody can give me prompt recommendations.
> 
> 
> regards,
> Femi
> 
> 
> 
> 
> 
> 


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to