On Fri, Apr 09, 2004 at 10:54:04AM +0300, Shachar Shemesh wrote: > 1. I know, I write perl like a C programmer, I can't help it. Feel free > to show me how it's done.
Not a perl guru by any stretch of the imagination, but behold my google foo! #!/usr/bin/perl @ARGV = qw(.) unless @ARGV; use File::Find; find sub { print $File::Find::name, -d && '/', "\n" }, @ARGV; (copied straight out of http://iis1.cps.unizar.es/Oreilly/perl/cookbook/ch09_08.htm. You were working at the wrong level of abstraction.) > 2. For some strange reason, the moment I recurse once, the entire loop > structure exits. I suspect it's because the DIR handle is global. Will > any perl guru comment on how it's supposed to be done? No idea, but something looks funky about the usage of DIR indeed. > 3. What the @$([EMAIL PROTECTED] is the difference between "my" and "local"? Which > one should I use here? http://prometheus.frii.com/~gnat/yapc/2000-stages/slide21.html Cheers, Muli -- Muli Ben-Yehuda http://www.mulix.org | http://mulix.livejournal.com/
signature.asc
Description: Digital signature