🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #10515

Re: [Perl-Novato] Encontrar un fichero index.* : SOLUCIONADO

#10515
From: David
Date: Tue, 26 Feb 2002 14:34
31 lines
1692 bytes
aktin0s <aktin0s@gmx.net> wrote in message news:<6iqd5a.cc4.ln@gw.kn0wledge.lan>...
> 
> Puedes usar File::Find, un ejemplo
> 
> #!/usr/bin/perl -w
> use strict;
> use File::Find;
> 
> my ( $dir ) = @ARGV;
> 
> find( \&index, $dir );
> 
> sub index
> {
>   $File::Find::prune = 1
>     if ( -d && $File::Find::name ne $File::Find::topdir);
>   print "$File::Find::name\n"
>     if ( -f && /index\./ );
> }
> 

Oye, estupendo. No me he enterado de mucho realmente (lo confieso, he
cortado y pegado), pero me funciona. Prometo hacer perldoc File::Find
y estudiarlo bien.
La verdad es que como llevo muy poco con Perl (de hecho, �ste es mi
primer script serio de "producci�n"), conozco muy pocos m�dulos, s�lo
el DBI y poco m�s.

Gracias.

Un saludo.
Technical Details
Message-ID: <1759581e.0202260634.6ddc89ae@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
References: <1759581e.0202250600.7020a360@posting.google.com> <6iqd5a.cc4.ln@gw.kn0wledge.lan>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,91055ca77b044ab2
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2002-02-26 06:34:55 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
From: forodejazz@yahoo.es (David)
Newsgroups: es.comp.os.linux.programacion
Subject: Re: [Perl-Novato] Encontrar un fichero index.* : SOLUCIONADO
Date: 26 Feb 2002 06:34:55 -0800
Organization: http://groups.google.com/
Lines: 31
Message-ID: <1759581e.0202260634.6ddc89ae@posting.google.com>
References: <1759581e.0202250600.7020a360@posting.google.com> <6iqd5a.cc4.ln@gw.kn0wledge.lan>
NNTP-Posting-Host: 195.235.255.227
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1014734095 29970 127.0.0.1 (26 Feb 2002 14:34:55 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 26 Feb 2002 14:34:55 GMT