Perl Programming/Keywords/sprintf

The sprintf keyword
The sprintf function returns a string formatted by the usual printf conventions of the C library function sprintf.

If the list is omitted, the contents of $_ is used as format information. To use the printf without a printf, a real filehandler like FH and not an indirect filehandler like <tt>$fh</tt> is required. In this case, if <tt>$_</tt> contains formatting information, it will be replaced by an empty string and a warning will be emitted, if they are enabled. So, it's better to use <tt>print</tt> when the contents of <tt>$_</tt> are to be used as formatting information.

<tt>print</tt> is simpler and less errorprone than <tt>printf</tt>ǃ

Examples
The code