It always seemed evil and wrong to me that I could just blat out quick and dirty perl code on the command line + run it with "perl -e", but not C code, so I hammered this out to make it easy to test C code fragments. The extra glue to make it work together with perl was pretty easy. Wrote this perl script called "c" .. it takes arguments like: > c {c|p} [...] "c" takes each codefragment, marked by its prefix as either a C or perl fragment, compiles the C fragments into executables, and then runs the perl fragments and C fragments together, linked via shell pipes, eg: > c p perlfrag1 c cfrag1 p perlfrag2 c cfrag2 p perlfrag3 .. would execute the command like: perlfrag1 | cfrag1 | perlfrag2 | cfrag2 | perlfrag3 Real-life example: azathoth:~/prog/clip> ./c p 'print("3\n");' c 'main(){ int i, k; scanf("%d",&k); for ( i = 0; i < k; i++ ) printf("hello, world\n");}' hello, world hello, world hello, world And then I just added a perl fragment to the end of it to count like strings.. azathoth:~/prog/clip> ./c p 'print("3\n");' c 'main(){ int i, k; scanf("%d",&k); for ( i = 0; i < k; i++ ) printf("hello, world\n");}' p '%h = (); while(defined($buf = )) { chomp ( $buf ); $h{$buf}++; } foreach $x ( keys ( %h ) ) { $n = $h{$x}; print("$x occurred $n times\n"); }' hello, world occurred 3 times Should be easy to extend the script to include other kinds of code fragments, like C++, python, whatever.