Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: If I had a Free Two Months...

by diotalevi (Canon)
on Jun 22, 2005 at 13:17 UTC ( [id://469100]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^3: If I had a Free Two Months...
in thread If I had a Free Two Months...

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 );

Replies are listed 'Best First'.
Re^5: If I had a Free Two Months...
by samizdat (Vicar) on Jun 23, 2005 at 12:51 UTC
    See? Thanks to PM, I know have my whole 2 months back. Awesome, diotalevi, and also kudos to those who've pointed out how to use *NIX find! :D

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://469100]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.