in reply to Find nonnumeric scalars
Use a signal handler?:
{ local $SIG{__WARN__} = sub { print "Bad line: '$_'"; return; }; for( qw[ 1 2 3 d 5 f 6 ] ) { print $_ * 2; } };; 2 4 6 Bad line: 'd' 0 10 Bad line: 'f' 0 12 [download]