On 08/14/2006 06:54 PM, SFantar wrote:
Hello everyone
I want to list all the Perl modules installed on my system. The script
below does it well.
Unfortunately, it displays the name of each installed Perl module twice.
How can I get rid of them? [...]
For me it only displays each module once. Perhaps some of the
directories appear twice in your PERL5INC environment variable.
Anyway, you can use a hash to remove duplicates.
What exactly are you trying to do? If it's to print out the
base file name for all of the modules on your system, you
could do this:
use File::Find;
find (sub {
print "$_\n" if (-f _ && /\.pm$/);
}, @INC);
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>