c = c.charCodeAt(0); c++; c = c.toString(); temp = c; c = String.fromCharCode(temp); line += c; #### line += String.fromCharCode(c.charCodeAt(0)+1); #### $line .= chr(ord($c)+1); #### use strict; use warnings; my $line = "hello"; my $c = "A"; print "1. line='$line' c='$c'\n"; $line .= chr(ord($c)+1); print "2. line='$line' c='$c'\n"; #### 1. line='hello' c='A' 2. line='helloB' c='A'