in reply to How can I create an array of filenames?
To additionally recurse the directories:@list = grep{ (-M) <= 1} <*>;
Hope this helps,our @list; findrecent('*'); sub findrecent{ my $glob = shift; for ( glob $glob ){ push( @list, $_) if (-M) <= 1; findrecent( $_.'/*' ) if -d; } }
Jeroen
"We are not alone"(FZ)
Update: You may want to throw in an and not -l to prevent endless loops ;-) thanks to tilly for pointing me to this problem
|
|---|