in reply to unix perl web spider

Your script actually creates a lot of trouble (apart from the fact that this wheel has already been invented numerous times). In no particular order: You really should be using LWP::Simple rather than using "curl" in backticks. so that you don't need to worry about strange or dangerous results from "shell-magic" characters in the urls. In any case, it'll be more efficient than using sub-shells (esp. nested ones).

You should also get acquainted with the concept of recursive subroutine calls, so that you have just one subroutine in one process that handles all the depth levels (instead of a separate sub process for each level).

In any case, I strongly advise that you do not use the code as originally posted, especially not in a unix shell.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.