in reply to Logfile parsing (Moved from Q&A)

Something like the following ought to do it:
my @ids; while (<LOG>) { if (/id\+(\d+)/) { push @ids, $1; } }
That's not substantially different from what you have, so you should probably post the code you're using so we might have more detail.