http://www.perlmonks.org?node_id=61557


in reply to Recursive directory scanning

If you're doing *any* recursive directory stuff, use the File::Find module. It simplifies the above to
perl -Mstrict -MFile::Find -wle 'find( sub {print}, @ARGV)' .