Perl:Convert a String to a Number
Revision as of 12:24, 31 December 2007 by Andr3w (New page: ==String to int== <question xmlns:htm="http://www.w3.org/1999/xhtml" lang="pl" className="Demo"><prog> my $s = "1234"; print $s+1; </prog> <p> The language will automatically convert the s...)
String to int
The language will automatically convert the string to an integer as required.
The value "1234" is a string, you need to treat it as a number - to add 1, giving 1235.