On 07/09/2015 01:19 PM, Jim Gibson wrote:
It is because you are calling the Traverse() subroutine with two arguments to
recurse a directory tree, but you are not using the arguments. Each call to
Traverse uses the global $dir variable as the root of the tree, so it will
never terminate.
You need a statement such as this near the top of your routine:
my( $dir, $writer ) = @_;
why hasn't anyone mentioned File::Find here? it does what the OP wants
and without the bugs.
uri
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/