Filter input and remove warnings

Filter input to extract numeric information, and remove some Perl
warnings.