And another nit. :-) Jenda Krynicky wrote: > > Just a few nits ;-) > > From: "Hanson, Rob" <[EMAIL PROTECTED]> > > I think there is something like that, but I'm not sure. In the past I > > have rolled my own like this... > > > > #!/usr/bin/perl > > > > use File::Find; > > > > my $dir = ''; > > > > for (@INC) { > > $dir = $_; > > find (\&wanted, $dir); > > } > > > > sub wanted { > > next unless /\.pm$/;
You are not in a loop so next is inappropriate. return unless /\.pm$/; [snip] > sub wanted { > next unless /\.pm$/; Again, return instead of next. return unless /\.pm$/; > my $file = $File::Find::name; > > substr( $file, 0, $dir_len) = ''; > substr( $file, -3) = ''; > $file =~ s|[/\\]|::|g; # convert slash to :: > > print "$file\n"; # print module name > } John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]