Converting a string scalar into a number.
To convert a string scalar to a number, just add zero.
Sometimes Perl calculations get a bit screwed, when Perl decides it is dealing with a string – not a number.
Here is the code to fix it up:
print $scalar + 0;
[tags]Scalars, Perl Coding School[/tags]
[/reference]If you have found my website useful, please consider buying me a coffee below 😉