in reply to RegExp help

The reason is that $file =~ s/\s*$// is clearing the $DIGIT variables and setting its own (which happen to be undef, since they're not defined by the regex). Perhaps you want to take this approach:
if (my ($f, $l) = $line =~ /(.+)\s*\(\)\xA1\s*(.+\.txt)/) { $f =~ s/\s+$//; # notice \s+ and not \s*, too print OUT qq{<a href="$l">$f</a><br>\n}; }

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;