good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
kidd's scratchpadby kidd (Curate) |
on Jun 03, 2004 at 02:01 UTC ( [id://359877]=scratchpad: print w/replies, xml ) | Need Help?? |
#!/usr/bin/perl -w use strict; # list all of the perl modules installed 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"; } |
|