Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ] Examples of Interpolation

Let us consider an example that uses a few of these characters:

#!/usr/bin/perl use strict; use warnings; print "A backslash: \\\n"; print "Tab follows:\tover here\n"; print "Ring! \a\n"; print "Please pay bkuhn\ \$20.\n";

This program, when run, produces the following output on the screen:

A backslash: \ Tab follows: over here Ring! Please pay [email protected] $20.

In addition, when running, you should hear the computer beep. That is the output of the `\a' character, which you cannot see on the screen. However, you should be able to hear it.

Notice that the `\n' character ends a line. `\n' should always be used to end a line. Those students familiar with the C language will be used to using this sequence to mean newline. When writing Perl, the word newline and the `\n' character are roughly synonymous.

  Published under the terms of the GNU General Public License Design by Interspire