Name: Anonymous 2009-03-02 5:35
I've got a little Perl script does a series of regexs and the
$1 sometimes carries over if there is no match because of an error. I came up with the following kludge, but there should be a better way to reset the $1.while ($file = shift) {
$file =~ /\[([0-9A-F]{8})\]/;
$sum1 = $1;
...
$bogus = "FAIL";
$bogus =~ /(FAIL)/;
$sum2 = `cksfv "$file" 2>/dev/null | grep -v "^;"`;
$sum2 =~ /([0-9A-F]{8})$/;
$sum2 = $1;
if ($sum1 eq $sum2) {
...