Oh oh. Here's the same non-buggy version that does invoke the shell. To fix the bug in your code, you'll need to follow symlinks and whenever considering entering a directory, decide whether you've been there before. Symlinks will cause your existing code to enter infinite loops and to run the command on some things more than once.
#!perl -w use strict; use File::Find; my ( $start_dir, $command ) = @ARGV; find( sub { system $command if -d }, $start_dir );
In reply to Re^4: If I had a Free Two Months...
by diotalevi
in thread If I had a Free Two Months...
by samizdat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |