in reply to modules installed by default?
I also have a Unix version of the code below. Both my versions print to the screen and to a file (as a newbie, I kinda like seeing it "do" something so I know it's working!). ;-)
Hope that helps.#!/usr/bin/perl5 -w #finds all .pm modules on a PC use strict; use File::Find; my $report = "C:\\Temp\\results.txt"; open MYOUTPUT, "> $report" or die "Can't open $report: $!"; my @directories = ("C:\\Perl"); my @foundfiles; # Collect all .pm files below each directory in @directories # and put them into @foundfiles find ( sub { push @foundfiles, $File::Find::name if /\.pm$/ }, @directories); #and print them to my file "results.txt" print "$_\n" for @foundfiles; print MYOUTPUT "$_\n" for @foundfiles; close MYOUTPUT;
Lori
|
|---|