June 2005
Beginner
480 pages
10h 31m
English
The print function is a very simple output function; it provides almost no formatting capability. To have fine-grained control over the appearance of expression values, such as left and right alignment, number of digits of decimal precision, and fixed-width output, you must use the Perl printf function instead.
The printf function was borrowed (almost verbatim) from the C programming language, but other languages have a similar function, such as BASIC's print using function. The syntax for printf is as follows:
printf formatstring, list printf filehandle formatstring, list
The formatstring is a string that describes the format of the output, which is described shortly. The list is a list ...
Read now
Unlock full access