I've given up on the search files utility as I can't get it to work.

I have an MD5 hash perl tool

It currently allows the user to input two file aths and it then displays the md5 hash of each file...

as it merely displays the path, I was wondering if it's possible to tell the user if there are differences or if they are the same

Here is the code:

use digest::MD5; print "\nPlease enter filepath and name (including file extension) of +the first file you would like to compare:\n\n"; $fileone = <STDIN>; chomp $fileone; print "\n\n"; print "\nPlease enter filepath and name (including file extension) of +the first file you would like to compare:\n\n"; $filetwo = <STDIN>; chomp $filetwo; print "\n\n"; open (FILE, $fileone) or print "File invalid, Please try again."; print "The MD5 hash of file one is: "; $md5a = Digest::MD5->new->addfile(*FILE)->clone->hexdigest; print "$md5a\n\n"; open (FILE, $filetwo) or print "File invalid, Please try again."; print "The MD5 hash of file two is: "; $md5b = Digest::MD5->new->addfile(*FILE)->clone->hexdigest; print "$md5b\n\n";

In reply to MD 5 hash comparison/checker by daggy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.