 |

Table of Contents
Main
-Home
-Advertising
-Contact Us
-Updates
Perl Overview:
-What is Perl?
Getting Started:
-Installing Perl
/ Unix
/ Windows
Writing Code:
-Hello World!
/ Basic Output
/ Adv. Output
-Variables
/ Scalar
/ Arrays
/ Joining Arrays
-File/Directory
/ Opening
/ Saving
/ Modifying
-Subroutines
/ Calling
/ Feeding




|
 |
3.1 - Scalar Variables
One important part of any programming language is variables. Variables give you the ability to create dynamic applications, and store temporary information. Unlike some languages, in PERL you do-not have to declare the variables before you use them. Below are a few examples of how scalar variables can be used.
- $bob = "bob"; #Declare bob as bob
- $jerry = "jerry"; #Declare jerry as Jerry
- $bob = $jerry; #Bob now equals Jerry
Here is some example code on howto append scalar variables.
- $name = "John";
- $last = "Doe";
- $firstlast = $name . $last;
- $firstlast = "First: " . $name . " Last: " . $last;
The following will do the same thing.
- $name = "John";
- $last = "Doe";
- $firstlast = "First: " . $name;
- $firstlast .= " Last: " . $last;
Ready to move onto Arrays?
Questions? Comments?
Visit Our Web Forums
|
 |

A1Javascripts
A heap of free javascripts to enhance your site!
123Webmaster
The largest directory of free webmaster resources on
the planet!
1-Click-Clipart
The most popular free clip art and web graphic sites on the web!
Free-Clip-Images
A monstrous collection of free graphics including
icons, lines, backgrounds, clip art, animated gifs, and more.
FreeWareFiles
Download tons of FREE Software! Games, Screen Savers,
Utils, and more!
httpCITY
25 megs of free webspace; httpcity.com/YOU!
PerlAccess
Learn perl, or to download free, original perl
scripts.
|
 |