@TomCo said:
Caché, where have you been?
<font color="#ff0000">"Gateway to Hell"</font>, indeed.
<font color="#800080" face="Courier New"><font color="#ff0000">C:</font> 67
<font color="#ff0000">a:</font> 97
<font color="#ff0000">c:</font> 99
<font color="#ff0000">h:</font> 104
<font color="#ff0000">e:</font> 101
<font color="#ff0000">d:</font> 100
<font color="#ff0000">b:</font> 98</font><font face="Courier New"><font color="#800080">TOTAL: </font><font color="#ff0000">666</font></font>
<font size="2" color="#000000" face="Courier New">perl -e "$total=0; foreach $c (split(//,qq(Cachedb))) { print qq($c: ).ord($c).qq(\n); $total += ord($c); } print qq(TOTAL: $total\n);"</font>
Lol and you wrote it in Perl code in all its WTF syntax! Maybe Mumps code doesn't look so bad by comparison:
set
string="Cachedb",sum=0 for i=1:1:$length(string) set c=$extract(string,i),a=$ascii(c)
write c_": "_a,! set sum=sum+a if i=$length(string) write
!,"Total: "_sum
C: 67
a: 97
c: 99
h: 104
e: 101
d: 100
b: 98
Total: 666