There are many definitions of efficiency. Perl's automatic handling of conversion between string values and numeric values means that each scalar variable must consume slightly more memory than if such a feature didn't exist. It also means that there is a slight speed cost over, say, 'C'. But here are several dirty little secrets I'll let you in on: Efficient algorithms are more important than micro-optimizations. Programmers time is often more expensive than machine time. And finaly: When algorithms and programming cost cannot offset the slight cost of an interpreted language, use C.
–
DavidOJul 7 '11 at 16:12

Here you can see that a Scalar Value (SV) has "15" the string as (PV), after doing an addition it adds (IV) (Integer Value).

perl saves Flags to knew which value is correct. For example in the first dump you see the Flag "POK" that says "PV" is correct, if you ask for this value, perl knew that he don't need to do a conversion and the value is correct.

After the addition you see "IOK" that says "IV" value is also okay.

After changing the value to 5 you see that "POK" is not set anymore. It invalidates the PV value. So if you call the string value, he needs to recalculate/convert the string from the IV.