Here you are Beau,

#!/usr/bin/perl -w


# list all of the perl modules installed

use strict;
use File::Find ;

for (@INC) { find(\&modules,$_) ; }

sub modules 
{
        if (-d && /^[a-z]/) { $File::Find::prune = 1 ; return }
        return unless /\.pm$/ ;
        my $fullPath = "$File::Find::dir/$_";
        $fullPath =~ s!\.pm$!!;
        $fullPath =~ s#/(\w+)$#::$1# ;
        print "$fullPath \n";
}

-----Original Message-----
From: Beau E. Cox [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 19, 2003 9:22 PM
To: [EMAIL PROTECTED]
Subject: Inatalled modules


Hi -

I have misplaced my 'installed module version' script,
and being lazy today :) , could someone remind me
how to list the installed modules/versions present
on a system? Nothing fancy. just get me started, please, and I can flesh it
out from there...

Aloha => Beau;
== please visit ==
<http://beaucox.com> => main site
<http://howtos.beaucox.com> => howtos
<http://PPM.beaucox.com> => perl PPMs
<http://CPAN.beaucox.com> => CPAN
== thank you ==



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to