Mercurial > repo
annotate bin/fromroman @ 12500:e48c08805365 draft default tip
<b_jonas> ` learn \'The password of the month is Cthulhuquagdonic Mothraquagdonic Narwhalicorn.\' # https://logs.esolangs.org/libera-esolangs/2024-04.html#lKE Infinite craft
author | HackEso <hackeso@esolangs.org> |
---|---|
date | Wed, 01 May 2024 06:39:10 +0000 |
parents | 00ccb2fe8c08 |
children |
rev | line source |
---|---|
5643 | 1 #!/usr/bin/perl |
12420
00ccb2fe8c08
<wib_jonas> python3 -cn="/hackenv/bin/fromroman";s=open(n).read();o=s.replace(\'{(sh\',\'{uc((sh\').replace(\'0]}\',\'0])}\');print(o);open(n,"w").write(o);print("write successful");
HackEso <hackeso@esolangs.org>
parents:
5643
diff
changeset
|
2 sub k{my$t;$t=~y/IVXLC/XLCDM/,$t.=("",I,II,III,IV,V,VI,VII,VIII,IX)[$_]for/./g;$r{$t}=$_;$t}k for s""\$"..4e3;print $r{uc((shift=~/(\w+)/)[0])},$/ |