sub FWriteF { my $file = shift; my $fmt = shift; my $text = sprintf($fmt, @_); _FRwriteF($file, $text); # calls C function as # FWriteF($file, "%s", $text); }