"John W. Krahn" wrote:
>
> This should give you some ideas on how to do it
>
> use warnings;
> use strict;
> use File::Find;
>
> my %files;
> find( sub {
> # put all .doc files in the hash
> push @{$files{$File::Find::dir}}, $File::Find::name if /\.doc$/i
> # get the directory name from the command line
> }, @ARGV );
>
> for my $dir ( keys %files ) {
> open CHK, "> $dir/checksum" or die "Cannot open $dir/checksum: $!";
> for my $file ( @$dir ) {
That last line _should_ be: :-)
for my $file ( @{$files{$dir}} ) {
> # this is assuming 'checksum' prints to standard output
> chomp( my $checksum = qx[checksum $file] );
> print CHK "$file $checksum\n";
> }
> }
>
> __END__
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]