#!perl -w use strict; use File::Find; my ( $start_dir, $command ) = @ARGV; find( sub { system $command if -d }, $start_dir );