Why do printf and sprintf behave differently ?
Posted
by eugene y
on Stack Overflow
See other posts from Stack Overflow
or by eugene y
Published on 2010-03-20T22:51:55Z
Indexed on
2010/03/20
23:01 UTC
Read the original article
Hit count: 152
perl
sub do_printf { printf @_ }
sub do_sprintf { print sprintf @_ }
do_printf("%s\n", "ok"); # prints ok
do_sprintf("%s\n", "ok"); # prints 2
© Stack Overflow or respective owner