Hi I have a module that has ties to a C library. the XS file looks like: ----- void bt_add_macro_text (macro, text, filename=NULL, line=0) char * macro char * text char * filename int line ----- the C code in the library is like ----- void bt_add_macro_text (char * macro, char * text, char * filename, int line) { ----- So everything looks good. If I call this function as my $string = "january"; bt_add_macro_text( substr($string, 0, 3), $string); I get a segmentation fault, because first parameter is 0x000000 but if I do my $string = "january"; my $abb = substr($string, 0, 3); bt_add_macro_text( $abb, $string); everything works well. Is this a bug, or something I am doing incorrectly? I imagine this happens becuse substr can be used as an lvalue, but I am not 100% sure. Thanks ambsThread Next