In order to capture matches within a regular expression you'll have to give $id list context:
my ( $id ) = $line =~ m/ID No: (\d+)/;
Should solve your problem
In reply to Re: Removing duplicate lines based on a match
by FunkyMonk
in thread Removing duplicate lines based on a match
by carrerag
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |