I'm trying to get a feel for how perl does things, using regex and arrays are pretty simple. I'm getting confused on what you can do with numbers as opposed to chars or strings. The fact that you have two sets of comparison operators, one for strings and one for numbers. I'm brand new to this language, and while it's pretty neat, it's also pretty weird, at least right it just feels weird and really different.

Numbers have a default order, the numeric order of their value. Strings also have a default order, the order that they would appear in a dictionary. In perl, both strings and numbers are treated as scalars. Perl would not know which order to use if we did not specify. We do this by our choice of operators.

The problem does not arise in "C/C++" because strings are treated as arrays. The scalar operators always use numeric order. Note that you do have the same problem with the "C" functions that operate on strings.

Back to perl. If you try to use the numeric operators on scalars that contain anything but a single number, perl attempts to convert them to numbers. (This is seldom, if ever, what you intend. It is not worth thinking about.) If you use the string operators on a scalars that contain only a single number, perl treats each as string of digits. (This may be what you want, but probably not. e.g. (3 gt 12) is true ) Good Luck, Bill