Pregunta PERL

Alvaro Herrera alvherre en dcc.uchile.cl
Mie Jun 9 14:55:46 CLT 2004


On Wed, Jun 09, 2004 at 12:56:39AM -0400, Cristian Gutierrez wrote:

> ,----
> | $directorio = '/home/user/public_html/salida';
> | 
> | opendir DIR, $directorio;
> | map { unlink "$directorio/$_" } grep { /\.txt$/ } readdir DIR;
> | closedir DIR;'
> `----

$directorio="/home/user/public_html/salida";

unlink glob "$directorio/*.txt";

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"You knock on that door or the sun will be shining on places inside you
that the sun doesn't usually shine" (en Death: "The High Cost of Living")



Más información sobre la lista de distribución Linux