if $line =~ /(.*)/ is redundant. The capture matches the whole string and the match always succeeds (even when $line is undef). Instead just use $address = _trim($line), or $address = _trim($line) if defined $line if $line can be undefined.
The .* in s/.* is important because it deletes any junk before the date along with the date, leaving just the address for the following code.
In reply to Re^3: Parsing Regex
by GrandFather
in thread Parsing Regex
by deMize
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |