in reply to Re^3: string to number via data dumper
in thread string to number via data dumper
Ken said it all, but just in case you have trouble understanding his example, just change:
my $n= "$val+8";
my $n= $val+8;
In the first code snippet above, you are constructing a string composed of the concatenation of your value (in string form) and the "+8" string. In other words, you are just doing string manipulation, no arithmetics. The second code snippet is actually adding the number 8 to your value. Now, if you understood the difference, go back to Ken's example.