[SP-pm] Ajuda básica

Márcio Vitor cromo.jml at gmail.com
Tue Jul 22 12:50:55 PDT 2008


Alexandre, sua dúvida é mais simples do que parece, falta um ponto e
vírgula no final da linha:

$proteinfilename = 'NM_021964fragment.pep';

[]s
Márcio Vitor

2008/7/22 Alexandre Tashima <aktashi em hotmail.com>:
> 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!
> _______________________________________________
> SaoPaulo-pm mailing list
> SaoPaulo-pm em pm.org
> http://mail.pm.org/mailman/listinfo/saopaulo-pm
>


More information about the SaoPaulo-pm mailing list