> 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 -r > $_/passwd"}, @ARGV; Okay, the magic. What you have is: find sub { ... }, @ARGV where sub { ... } corresponds to the &wanted function in the File::Find documentation. The bit in the sub { ... } means set $chambers{$filename} to the complete pathname (including filename) plus "/passwd", if that directory exists for reading. Or more clearly: if (-r "$_/password") { $chambers{$filename} = "$fullname/passwd" } The documentation for File::Find is the key to your troubles. Jonathan Paton -- #!perl $J=' 'x25 ;for (qq< 1+10 9+14 5-10 50-9 7+13 2-18 6+13 17+6 02+1 2-10 00+4 00+8 3-13 3+12 01-5 2-10 01+1 03+4 00+4 00+8 1-21 01+1 00+5 01-7 >=~/ \S\S \S\S /gx) {m/( \d+) (.+) /x,, vec$ J,$p +=$2 ,8,= $c+= +$1} warn $J,, -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>