Article View: es.comp.os.linux.programacion
Article #7999Re: Leer un fichero
From: Iñaki Arenaza
Date: Fri, 03 Jan 2003 15:40
Date: Fri, 03 Jan 2003 15:40
33 lines
2335 bytes
2335 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> "Reinoso" == Reinoso G <reinoso@probando.com> writes:
Reinoso> Hay que llamarlo poniendo datos.pl < datos.txt pues lee
Reinoso> de la entrada est�ndar.
En realidad no es cierto :) Perl se encarga de abrir el fichero (o
ficheros) que le indiques como parametros (uno detras de otro, cuando
acaba con el actual) si lees usando <>.
Pruebalo y veras que con:
datos.pl datos.txt
funciona igual de bien. Eso si, si lo vas a usar con varios ficheros y
quieres detectar el cambio de fichero por alguna razon, tendras que
meter algo mas de codigo.
Saludos. I�aki.
- --
Get PGP/GPG Keys at http://www.escomposlinux.org/iarenaza/pgpkey.php
I use free software / Yo uso software libre
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 <http://mailcrypt.sourceforge.net/>
iD8DBQE+Fa7WZXLnGT1HLgcRAhufAJ9ES+x6pyAqQGkGZP9wg+3Iz5k3DACfXmpf
h8bLoe4wpWXIoYRl/5P7MXE=
=c2RR
-----END PGP SIGNATURE-----
Technical Details
Message-ID:
<8765t6xmw9.fsf@barad-dur.escomposlinux.org>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!news.eteo.mondragon.edu!not-for-mailReferences:
<7d4ff0e4.0301020707.6388a1a6@posting.google.com> <slrnb1b32h.tm.reinoso@EA4BAO.PLLANO.ESP.EU>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,5cf283a7acb0d167 X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2003-01-03 07:40:09 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!news.eteo.mondragon.edu!not-for-mail From: iarenaza@eb2ebu.ampr.org (Iñaki Arenaza) Newsgroups: es.comp.os.linux.programacion Subject: Re: Leer un fichero Date: Fri, 03 Jan 2003 16:40:06 +0100 Organization: Mondragon Unibertsitatea - ETEO Lines: 33 Distribution: es Message-ID: <8765t6xmw9.fsf@barad-dur.escomposlinux.org> References: <7d4ff0e4.0301020707.6388a1a6@posting.google.com> <slrnb1b32h.tm.reinoso@EA4BAO.PLLANO.ESP.EU> NNTP-Posting-Host: 22.red-80-38-245.pooles.rima-tde.net Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: poseidon.eteo.muni.es 1041608407 6191 80.38.245.22 (3 Jan 2003 15:40:07 GMT) X-Complaints-To: newsmaster@eteo.mondragon.edu NNTP-Posting-Date: Fri, 3 Jan 2003 15:40:07 +0000 (UTC) User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/20.7 (i386-debian-linux-gnu) Cancel-Lock: sha1:Afed+/q1PpAylIGykIS4wuFqdic=