http://www.perlmonks.org?node_id=738233


in reply to Re: How can i extract a number from an string
in thread How can i extract a number from an string

/^BS(\d)/ or warn("Invalid frobniz id ($_)\n"), next;

Or possibly die on bad input. Never ignore it.

(And, it's better to be explicit about the loop variable IMHO, $_ is a missed opportunity to write self documented code).

/J