[SP-pm] Res: Ajuda básica
Alexandre Tashima
aktashi at hotmail.com
Tue Jul 22 13:05:30 PDT 2008
Obrigado pelas respostas. Este erro do ; eu nem havia notado, porque eu copiei novamente os arquivos do exemplo do livro.
Abraços,
Alexandre
Date: Tue, 22 Jul 2008 12:55:18 -0700
From: ricardo_filipo em yahoo.com.br
To: saopaulo-pm em mail.pm.org
Subject: [SP-pm] Res: Ajuda básica
Paree que falta o ";" depois de
$proteinfilename = 'NM_021964fragment.pep'
E bons trabalhos com perl!
Abração!
----- Mensagem original ----
De: Alexandre Tashima <aktashi em hotmail.com>
Para: saopaulo-pm em pm.org
Enviadas: Terça-feira, 22 de Julho de 2008 16:39:27
Assunto: [SP-pm] Ajuda básica
Olá,
Acabo de me inscrever na lista porque tenho algumas dúvidas básicas sobre Perl. Estou começando a aprender a linguagem porque tenho interesse em bioinformática e Perl me pareceu muito interessante para a área. Bom, estou com uma dúvida básica e não sei se este é o meio adequado para resolvê-la, mas vamos lá. Comecei a fazer alguns programas e usando o comando open para abrir um arquivo, me aparece a seguinte mensagem de erro:
syntax error at read_prot.pl line 12, near "open"
Execution of read_prot.pl aborted due to compilation errors.
O programa que escrevi é do exemplo 4.5 do livro Beginning Perl for Bioinformatics:
#!usr;bin;perl -w
# Reading protein sequence data from a file
# The filename of the file containing the protein sequence data
$proteinfilename = 'NM_021964fragment.pep'
# First, we have to open the file and
associate
# a filehandle to it. We choose filehandle
# PROTEINFILE for readability.
open PROTEINFILE, $proteinfilename or die $!;
# Now we do the actual reading of the protein sequence data
# from the file by using the angle brackets <> to get the input
# from the filehandle. We store our data into our variable $protein
$protein = <PROTEIN>;
# Now that we've got our data, we can close the file
close PROTEIN;
# Print the DNA onto the screen
print "Here is the protein:\n\n";
print $protein, "\n\n";
exit;
e o arquivo 'NM_021964fragment.pep' contém uma sequência com letras de aminoácidos que compõem uma proteína. Uso um computador IBM pentium 4 com Windows XP Home. Não sei o que há de errado, alguém pode me ajudar a resolver este problema?
Obrigado,
Alexandre
Discover the new Windows Vista Learn more!
Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua cara @ymail.com ou @rocketmail.com.
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx
-------------- Pr?xima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/saopaulo-pm/attachments/20080722/cd3fbd0c/attachment.html>
More information about the SaoPaulo-pm
mailing list