Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2018-08-20 16:12 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (192 votes). Check out past polls.