Re: File::find with no_chdir

2006-09-19 Thread Mumia W.
On 09/18/2006 10:11 AM, Emilio Casbas wrote: Hi, I have this script; --- use File::Find; $File::Find::no_chdir = 0; find(\&wanted, @ARGV); sub wanted { print "$File::Find::name\n" if(-d); } --- I want to do a directory search for a given ARG, but no a recursive search

Re: File::find with no_chdir

2006-09-18 Thread Emilio Casbas
John W. Krahn wrote: Emilio Casbas wrote: Hi, Hello, I have this script; --- use File::Find; $File::Find::no_chdir = 0; find(\&wanted, @ARGV); sub wanted { print "$File::Find::name\n" if(-d); } --- I want to do a directory search for a given ARG, but no

Re: File::find with no_chdir

2006-09-18 Thread Beginner
On 18 Sep 2006 at 22:34, John W. Krahn wrote: I see. Thanx And this I guess: Ternary ``?:'' is the conditional operator, just as in C. It works much like an if-then-else. If the argument before the ? is true, the argument before the : is returned, otherwise the argument after the : is return

Re: File::find with no_chdir

2006-09-18 Thread John W. Krahn
Beginner wrote: > On 18 Sep 2006 at 15:05, John W. Krahn wrote: >> >>my $dir = '/tmp'; >> >>opendir my $dh, $dir or die "Cannot open '$dir' $!"; >> >>print "$dir\n", >> map !/\A\.\.?\z/ && -d "$dir/$_" ? "$dir/$_\n" : (), >> readdir $dh; > > That's looks nice John...but what is actually

Re: File::find with no_chdir

2006-09-18 Thread Beginner
On 18 Sep 2006 at 15:43, David Romano wrote: > Beginner wrote on Mon, Sep 18, 2006 at 03:24:08PM PDT: > > > print "$dir\n", > > > map !/\A\.\.?\z/ && -d "$dir/$_" ? "$dir/$_\n" : (), > > > readdir $dh; > > > > > > John > > > > That's looks nice John...but what is actually happening

Re: File::find with no_chdir

2006-09-18 Thread David Romano
Beginner wrote on Mon, Sep 18, 2006 at 03:24:08PM PDT: > On 18 Sep 2006 at 15:05, John W. Krahn wrote: > > opendir my $dh, $dir or die "Cannot open '$dir' $!"; > > > > print "$dir\n", > > map !/\A\.\.?\z/ && -d "$dir/$_" ? "$dir/$_\n" : (), > > readdir $dh; > > > > John > > That's lo

Re: File::find with no_chdir

2006-09-18 Thread Beginner
On 18 Sep 2006 at 15:05, John W. Krahn wrote: > Emilio Casbas wrote: > > I have this script; > > > > --- > > use File::Find; > > > > $File::Find::no_chdir = 0; > > find(\&wanted, @ARGV); > > > > sub wanted { > >print "$File::Find::name\n" if(-d); > >} > > > > --- > > >

Re: File::find with no_chdir

2006-09-18 Thread John W. Krahn
Emilio Casbas wrote: > Hi, Hello, > I have this script; > > --- > use File::Find; > > $File::Find::no_chdir = 0; > find(\&wanted, @ARGV); > > sub wanted { >print "$File::Find::name\n" if(-d); >} > > --- > > I want to do a directory search for a given ARG, but no a rec

Re: File::find with no_chdir

2006-09-18 Thread D. Bolliger
Emilio Casbas am Montag, 18. September 2006 17:11: > Hi, Hi Emilio > I have this script; > > --- > use File::Find; > > $File::Find::no_chdir = 0; > find(\&wanted, @ARGV); > > sub wanted { > print "$File::Find::name\n" if(-d); > } > > --- > > I want to do a directory search

Re: File::find with no_chdir

2006-09-18 Thread Jack Faley ( Who's going to take me serious without a laser pointer?)
On 9/18/06, Emilio Casbas <[EMAIL PROTECTED]> wrote: Hi, I have this script; --- use File::Find; $File::Find::no_chdir = 0; find(\&wanted, @ARGV); sub wanted { print "$File::Find::name\n" if(-d); } --- I want to do a directory search for a given ARG, but no a recurs

File::find with no_chdir

2006-09-18 Thread Emilio Casbas
Hi, I have this script; --- use File::Find; $File::Find::no_chdir = 0; find(\&wanted, @ARGV); sub wanted { print "$File::Find::name\n" if(-d); } --- I want to do a directory search for a given ARG, but no a recursive search, for example this script show this; [EMAIL