in reply to Is a integer or string.
There is no difference in Perl scalar variable in case of string and integer. If the value of the variable have only numbers, it treat as integer and it required "==" for comparison. If any alphabets available in variable, it treat as, string.
Is there any case where it fails?In all places, the second condition will work.
From perlintro man page,
Scalar values can be strings, integers or floating point numbers, and Perl will automatically convert between them as required.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is a integer or string.
by akho (Hermit) on May 25, 2009 at 13:22 UTC |