in reply to global issue with an RE, I think...

I see two problems

  1. You're closing the input filehandle inside the loop after reading the first record from it. The while loop ends after the first record because the read on the closed filehandle returns false.
  2. $text .= $_; appends each input line to $text.

Try something like this:

while (<INPUT>) { while ( m!clb_new>([^<]+)</a>!g ) { print $1; } }

conv

Update: