Re: find sub {}

2004-12-16 Thread Jonathan Paton
> Can anyone explain to me the code below ... > > use File::Find; perldoc File::Find > @ARGV = '/var/yp/src' unless @ARGV; If no files are specified, then pretend we got /var/yp/src. > my %chambers; Create a hash called %chambers. > find sub { $chambers{$_} = $File::Find::name . "/passwd" if

RE: find sub {}

2004-12-16 Thread Bill Adams
ember 16, 2004 11:17 AM To: Bill Adams; [EMAIL PROTECTED] Subject: RE: find sub {} Bill Adams wrote: > Hi All, > > I've inherited a perl application. Can anyone explain to me the code > below, particularly "find sub {" > > find sub { $chambers{$_} = $File::Find

RE: find sub {}

2004-12-16 Thread Bob Showalter
Bill Adams wrote: > Hi All, > > I've inherited a perl application. Can anyone explain to me the code > below, particularly "find sub {" > > find sub { $chambers{$_} = $File::Find::name . "/passwd" if -r > $_/passwd"}, @ARGV; Jonathan gave you a detailed answer, so I'll add just a bit more. Th