Monday, January 3, 2011

Perl: String Calculation

Strings

In perl, strings and numbers are seamlessly converted into each other depending on the context in which they are used.

print (("5" + "6"), "\n");
print ((56 . 23), "\n");

The output of this program is:
 
11
5623

No comments: