|
Home
Languages
VB6
JavaScript
Perl
HTML
SQL
Java
DOS
Forums
Web Site
Software
gbCodeLib
Personal
Webcam
Biography
Contact Me
|
GBIC >>
Source Code >>
PERL >> Snippet
|
01 Overview
Perl source code is simply lines of text (a script) which the perl
.
exe program
executes one by one, starting from the top
.
Perl has a very loose formatting requirement
-
freespace to left of statement is ignored
-
indent all you want
-
freespace anywhere except in string literals is ignored
-
end all statements in semicolon ;
-
anything on a line after a
# is ignored - is a comment
-
Perl executes top to bottom
-
sub
routines can be placed anywhere within the code
-
convention is at bottom
-
sub
routines can be referenced before they appear
-
Perl is case sensitive
-
() parenthesis, when normally used, are optional
-
term
"escape"
is means to prevent character from being interpolated within quotes
Data types
$
scalar
(numbers
and
strings)
@ arrays
% associative arrays
& Subroutines
|
|
|
|