The second is calling the print function with the results of the sprintf, and then trying to '.' the result of the print fun with "hello\n", throwing away the result.print sprintf("%5.5d", 1) . "hello\n";
(The first one calls sprintf in list context, and makes it a scalar for an argument to print by prepending ''.)
C.
In reply to Re: sprintf minor problem
by castaway
in thread sprintf minor problem
by Melly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |