#include/* C + Perl + Ruby polyglot. $s = "*/ int main(int O, char **s) { O = O ? O : O/0- **s; return 0; }/*"; # Define common variables and code shared by both Perl and ruby. $tab = $x = $y = $p = 1; $code = ' $i == 47 && $p == 79 && print($0, ":", $y + 1, ":", $x, ":: div\n"); $x += $i == 9 ? $tab - ~-$x % $tab : 1; $y += $i == 10 ? $x = 1 : 0; $p = $i; '; # Ruby only. $r = "#{ $tab = 8 $s.each_byte{|i| $i = i %q[ "; # Perl only. if( 1 ) { foreach $i (unpack 'C*', $s) { #]; eval $code; } } # Terminate ruby quote. #"#*/