in reply to string to scalar?

You don't have to convert the string, you can just use it as an integer.
Perl does the conversion automagically for you.

Example:

$x = "36"; $y = $x * 2; print $y; gives 72