<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt">Estou tentando abrir o arquivo. Fiz a declaração da forma que você falou. <br>Porem quando vou executar ocorre este erro,<br><br><span style="font-weight: bold;">Global symbol "@dado" requires explicit package name at abrearq.pl line 5.</span><br style="font-weight: bold;"><span style="font-weight: bold;">Global symbol "@dado" requires explicit package name at abrearq.pl line 7.</span><br style="font-weight: bold;"><span style="font-weight: bold;">Execution of abrearq.pl aborted due to compilation errors.</span><br><br><span style="text-decoration: underline;">O codigo</span><br><br>use strict;<br>use warnings;<br>open(FILE,"&lt;ramon.txt") or die "Nao conseguiu localizar o arquivo\n";<br>@dado=&lt;FILE&gt;;<br>print "Arquivo ok";<br>close @dado;<br><div>&nbsp;<br>Estou fazendo algo de errado?<br>ainda não implementei a
 questão dos parâmetros. Primeiro preciso jogar o arquivo texto no array do tipo @.<br><br></div>_________________<br>Ramon M. de Souza<br>soulhave@yahoo.com.br<br>Bacharelando em Sistemas de Informação<div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Mensagem original ----<br>De: Daniel Vinciguerra &lt;daniel_5h4d0w@hotmail.com&gt;<br>Para: cascavel-pm@pm.org<br>Enviadas: Sábado, 25 de Novembro de 2006 13:16:56<br>Assunto: Re: [Cascavel-pm] Res: Perl<br><br><div style=""><p><font style="font-size: 11px; font-family: tahoma,sans-serif;">heheh... valeu mesmo cara.. vou tentar aqui.. <br>Mas aqui estou com problema para poder declarar a matriz com o arquivo.. <br>vou te mostrar o fonte de exemplo que estou tentando abrir o arquivo e está ocorrendo erro.<br><br><span style="font-weight: bold;">#!/usr/bin/perl<br><br>use warnings;<br>use strict;<br>open
 (arquivo, "&lt;esportes.txt" ) or die "Nao consegui abrir esportes.txt";<br>@arqs=&lt;arquivo&gt;;<br>...<span style="font-weight: bold;"><span style="font-weight: bold;"><br><br></span></span></span>Ai da erro nesta linha, ele consegue abrir o arquivo porém no vetor ele da erro. o pode ser?<span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"><br></span></span></span><br><br><span style="font-family: courier new,monospace;">if (@ARGV != 
3) {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print "Uso: perl $0 arquivo modo quantidade\n";</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit 1;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}else{</span></font></p>
<p><font style="font-size: 11px; font-family: tahoma,sans-serif;"><span style="font-family: courier new,monospace;">my @ARGV = <span style="font-family: courier new,monospace;">($arquivo, $modo, $quantidade); #Aproveitando os codigos abaixo</span></span></font></p>
<p><font style="font-size: 11px; font-family: tahoma,sans-serif;">}</font></p>
<p><font style="font-size: 11px; font-family: tahoma,sans-serif;">#e depois você inicia a abertura do arquivo</font></p>
<p><font style="font-size: 11px; font-family: tahoma,sans-serif;">open (FILE, "&lt; $arquivo" ) or die "O programa não conseguiu localizar $arquivo!!!\n";<br>@dado = &lt;FILE&gt;;</font></p>
<p><a rel="nofollow" target="_blank" href="mailto:#@ARGV"><font color="#000000"># @ARGV</font></a> só vai ser usado para se obter as informações(parametros) para sua abertora do arquiv</p>
<p># Naquele caso você a usou como Array para depositar todo o conteudo do arquivo... "A grosso # modo" ^^</p></div><br clear="all"><SPAN style="width:100%;height:2px;border-bottom:1px solid rgb(212,208,200); border-top:1px solid rgb(128,128,128);background-color:black;overflow:hidden; margin:8px 0px;"></SPAN>Chegou o Windows Live Spaces:você divide seu blog, suas fotos, sua lista de música e agora encontra seus amigos! <a rel="nofollow" target="_blank" href="http://g.msn.com/8HMABRBR/2731??PS=47575"> É só entrar no:</a> <div>_______________________________________________<br>Cascavel-pm mailing list<br>Cascavel-pm@pm.org<br><a target="_blank" href="http://mail.pm.org/mailman/listinfo/cascavel-pm">http://mail.pm.org/mailman/listinfo/cascavel-pm</a></div></div><br></div></div><br>
                <hr size=1> 
Você quer respostas para suas perguntas? Ou você sabe muito e quer compartilhar seu conhecimento? Experimente o <a href="http://us.rd.yahoo.com/mail/br/tagline/answers/*http://br.answers.yahoo.com/">Yahoo! Respostas</a>!</body></html>