in reply to Problem in "any"
You need a criteria
any BLOCK LIST Returns a true value if any item in LIST meets the criterion given through BLOCK. Sets $_ for each item in LIST in turn:
if (any {$line_number == $_} @line_numbers){ [download]