in reply to Using sprintf

I was going to suggest that you make sure to have use strict; in your code, but then I realized that stricture doesn't help in this case. What the OP code was doing is equivalent to:
sprintf( {"string1", $string2} )
and that is not a syntax error or any kind of violation of strictures or warnings, despite the fact that it is something you would never really want to do (i.e. passing a hash reference as the first and only parameter to sprintf).