9. Perl, 84 bytes
#v;7||"<+0+0+0+<;n4
#>3N.
#|\w*
#8
#|
#M`
print(None and 9or 1/2and 1or 5)
#jd5ki2#j␛d5ki2
There's a literal ESC character in the actual code between the j
and d
on the last line, but my browser doesn't want to put; it into the input box. (Perhaps someonehas been replaced with a different browser could edit it in?)␛ here for visibility.
This prints 1 in Python 3, 2 in Vim (tested locally, but here's a link for the very similar language V), 3 in Minkolang, 4 in <><, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, and 9 in Perl.
Let's get some more exoteric languages in, via abusing arithmetic that works differently in different languages. (None
is falsey in Python but truthy in Perl, and and
/or
chains work the same way in both languages.)
Apart from Python, I also had to change the vim code. Instead of making it into a series of no-ops, I just let it insert junk, then deleted the junk again at the end.