sub perl_routine { $byte_string = pack "I*", (0) x ( $x_dimension x $y_dimension ); c_function( $byte_string, $x_dimension, $y_dimension ); } void c_function( char *byte_string, int x_dimension, y_dimension ) { int **table = ( int ** ) byte_string; int i, j; for ( i = 0; i < x_dimension, i++ ) { for ( j = 0; j < y_dimension, j++ ) { table[ i ][ j ]++; } } }