Bret, the only suggestions I would make are to add some error handling to
the open call, and close SUMS when you are done. The error handling will
help one day when you forget the md5sums file, or name it differently or
something, and the close is just a good habit (perl closes it when the
script ends anyway)
charles
On Sat, 15 Apr 2000, Bret Hughes wrote:
> Wanting to learn a little about perl and needing to check the md5sums on
> newly downloaded iso files from redhat, I wrote this script to read the
> md5sums file and check the md5sums on all the files found in the current
> directory named in the md5sums file.
>
> Perl guru comments welcome if I have done something poorly or not at all
> that I should have done.
>
> #!/usr/bin/perl
> #printsums
> #run from the directory that contains the iso files and the md5sums file
> from redhat
> #this script reads the md5sums file, runs md5sum on the files if exists
> in the
> #current directory and compares the calculated checksums with that
> contained in the md5sums
> #file
> # Bret Hughes [EMAIL PROTECTED] April 15, 2000
> open (SUMS,"md5sums");
<snip>
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.