Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: File Copy on Linux

by xenchu (Friar)
on Dec 17, 2003 at 04:09 UTC ( #315216=note: print w/replies, xml ) Need Help??

in reply to File Copy on Linux

Here is a program that runs on RH Linux 9 that will list all the Perl modules installed on the system:

#!/usr/bin/perl - w # use strict; use File::Find; my @files; find sub { push @files, $File::Find::name if -f _ && /\.pm$ +/ }, @INC; my ($mod, $hash, $name); my (@results, %hash, @results2); @results = map {/.+\/.+\/(.*)\.pm$/} @files; #@results = sort {uc($a) cmp uc($b)} @results; #@results = map {/.+\/.+\/(.*)\.pm$/ and ucfirst($1)} @files; $hash{$_}++ foreach (@results); foreach (sort {uc($a) cmp uc($b)} keys %hash) { print "$ \n"; } #@results2 = grep( ($hash{$_} == 1), keys %hash ); #print join "\n", @results2; #print "\n";

BTW, I got the program here on Perl Monks. Someone listed it as part of their answer to a question asked. I wish I could remember where I got it so I could give proper attribution.


The Needs of the World and my Talents run parallel to infinity.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://315216]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2017-11-25 01:08 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (355 votes). Check out past polls.