in reply to Re^2: perl typecasting
in thread perl typecasting

Not having strict and warnings seems quite odd, as I believe they're part of core Perl. As for the code you've been requested to post, it would be the code that is being used to perform the validations, which I would expect to be fairly short: a single regexp to validate integers (untested: $integer =~ /^ *[+-]?[0-9]+$/;, i.e., any number of blanks, an optional sign, and at least one digit before the end-of-string) and a more complex regexp to validate floats (in my other language, I'd just try to read a string as float or as an integer and handle the cases where there's a non-zero error code returned).


emc

Information about American English usage here and here.

Floating point issues? Read this before posting: http://docs.sun.com/source/806-3568/ncg_goldberg.html