Home
Perl
Array
CGI
Class
Data Type
Database
File
GUI
Hash
Language Basics
Network
Regular Expression
Report
Statement
String
Subroutine
System Functions
Win32
XML
Menu
sprintf function with array variable : sprintf « String « Perl
Perl
String
sprintf
sprintf function with array variable
@a = (
"%s%s%s%s"
,
"P"
,
"e"
,
"r"
,
"l"
); print sprintf(@a);
Related examples in the same category
1.
Format 1234.56789
2.
Adding float-point number to the result returning from sprintf function
3.
Converting digit to string with sprintf
4.
Format Options for sprintf and printf
5.
Format and sprintf
6.
The sprintf command returns a formatted string
7.
Using sprintf to format a float-point number and assign the result to a variable
8.
Using sprintf.
9.
print sprintf "%+.4e\n", $value;
10.
print sprintf "%.2f", 3.1415926;
11.
print sprintf "%6.6f\n", $value;
12.
sprintf function assigns the formatted string to a variable.