Subject: | file_md5() breaks $_ |
Date: | Sat, 5 Apr 2008 16:27:22 +0200 |
To: | bug-Digest-MD5-File [...] rt.cpan.org |
From: | "Anders Andersson" <pipatron [...] gmail.com> |
Hi! I just found that file_md5() will destroy the $_ variable:
#!/usr/bin/perl -w
use Digest::MD5::File qw(file_md5_hex);
for( 1 .. 2 ) {
print "$_\n";
file_md5_hex('/etc/hostname');
print "$_\n"; # $_ is now undefined
}
Perhaps I'm using the function in the wrong way, but according to some
more knowledgable people this should be a bug. Easy to work around for
now, but still. I know too little about the magic perl variable
scoping to be able to give you a patch, I'm afraid.
Kind regards,
Anders