example code for various languages, C, Java, Perl, and Python