use warnings; use Inline C => Config => BUILD_NOISY => 1; use Inline C => <<'EOC'; void foo(AV * avref) { int i, len; SV ** elem; len = av_len(avref) + 1; for(i = 0; i < len; i++) { elem = av_fetch(avref, i, 0); printf("%s\n", SvPV_nolen(*elem)); } } EOC @strings = ( 'hello', 'a string', 'another string', 'bye', ); foo (\@strings);