Name

addfile

Synopsis

addfile(io_handle)

Reads io_handle until end-of-file and appends the content to the message for which you calculate the digest. addfile returns the Digest object itself. For example:

open(FILE, $file) or ...
print Digest::MD5->new->addfile(*FILE)->hexdigest, " $file\n";
close(FILE);

Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.