spiros has asked for the
wisdom of the Perl Monks concerning the following question:

Hello monks,

is there a Perl module out there that given an array of scalars returns a best guess of what data type describes the array. For example, given 100 numbers would guess that its a numerical array while mixed strings and numbers would return that the best data type is string.

I am thinking along the lines of what most statistical applications do when you load a CSV file and they try to guesstimate what data type each column is.

Proceed under that presumption unless proven wrong in which case modify definition of X to Y

I suppose there are hundreds of other ways to go about this. The reason I chose the above is that you could have millions of pieces of data to look at and exhaustively looking at each column would be a bit absurd. Besides, you would probably only need to 'catch' an error when trying to perform an activity with a subset like obtaining a standard deviation. In that case you would check each value anyway.