DocTaur - intranet directory of reference manuals
Yo-store
books for webmasters

reference manuals search engine

Perl Tutorial Book

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.5 Output of Scalar Data

To output a scalar, you can use the print and printf built-in functions. We have already seen examples of the print command, and the printf command is very close to that in C or C++. Here are a few examples:

 
use strict;
my $str  = "Howdy, ";
my $name = "Joe.\n";
print $str, $name;    # Prints out: Howdy, Joe.<NEWLINE>
my $f = 3e-1;
printf "%2.3f\n", $f; # Prints out: 0.300<NEWLINE>

This document was generated on July, 31 2004 using texi2html 1.70.