Chapter 4. Getting a Handle on Printing
When you complete this chapter, you should be able to explain each of the following statements (each statement is an entity unto itself):
printf "%-10s\t\$%d%10.2f\t%b\t%x\t%o\n", "Jack", 15,15,15,15,15;print 'She cried, "I can\'t help you!"'," \n";$str = sprintf "\$%.2f", $sal;print qq!\u$name, the local time is !, scalar localtime, "\n";use feature qw(say);say "The sum is ", 5 + 4;say "No more! "
Before we get started, please take note that each line of code, in most of the examples throughout this book, is numbered. The output and explanations are also numbered to match ...
Get Perl by Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.