sprintf result on perl

Hello,
In perl lang, I have create a string (@str) by sprintf but unfortunately when program printed it out, only I could saw a number like 1. Certainly printf doesn't problem. How I can convert a string that are result of sprintf to a common string format??!
Thanks in advance.
PLEASE HELP ME.

Usually, you assign the result of sprintf to a scalar ($) instead of an array (@). With an array as left side operator, you get the result of sprintf in the first and only element of the array.

What's the code in question that works incorrectly?

Yes, exactly. sprintf make scalar.:slight_smile: Thanks.