A string containing just decimal digits, can only be a number.
You could just as easily say a string containing just octal, or binary or
hexadecimal digits, can only be a number.
A decimal number might be a "leetspeak" word if you were wanting to be cryptic.
Perl determines from *context* if the user is trying to use a variable as a number or
a string. If the user tries to perform addition on a string -- it tries to see
if the string looks like a number and allows it if it does. But there is no reason it needs to be limited to decimal digits. This is even more evident if you consider octal digits as an example. Using a rule of 'leading 0' for octal or 'leading 0x' for hex seem fairly safe -- can you give an example where doing so would be a problem?
Come-on BuK, question the status quo! ;-)
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link
or How to display code and escape characters
are good places to start.