in reply to Traversing directories recursively

Use the CPAN, Luke.

#! /usr/bin/perl use strict; use warnings; use File::Find::Rule; my $start = shift || '.'; for my $obj (File::Find::Rule->in($start)) { print "$obj\n"; }

The key word in the module name is "Rule". You can add rules to restrict what is returned: files only, smaller or larger than a given size, belonging to foo, modified no more than 3 weeks ago, is read-only and so forth.

Get your rules right, and your own code becomes very simple.

• another intruder with the mooring in the heart of the Perl