In Perl, you can just try:
perl -ne 'chomp; print pack 'i', $_;'
32 , , , C.
'i', 'l', , 32-. little-endian big-endian.
http://perldoc.perl.org/functions/pack.html.
C, . :)
#include <stdio.h>
int main () {
int x;
while (fscanf(stdin, "%i", &x)) {
fwrite(&x, sizeof(x), 1, stdout);
}
return 0;
}