in reply to Question on pattern matching

you want
if ( $my_dat =~ /[^0-9]/ ) { # code here to handle the non-digits
your regexp looks for the beginning of the line followed by a digit... the one above looks for anything anywhere that is a NON-digit.

Replies are listed 'Best First'.
Re^2: Question on pattern matching
by nobull (Friar) on Jun 16, 2005 at 20:42 UTC
    /[^0-9]/ is more concisely written /\D/.