.:: Welcome To My Personal Blog ::.

Saturday, March 5, 2011

Beginner's Guide To Travel With Perl - Part 5

Scope - Something Important

It’s time to say something important now. We can declare any variable in two ways – First is writing variable name with $ sign and assigning a value to it. The second is to write variable name $ sign and adding “my” before it when the variable is used first time.

Beginner's Guide To Travel With Perl - Part 4

Branching

We may have to use condition in some programs. The syntax will be the following:
if ( condition ) {
...
} elsif ( other condition ) {
...
} else {
...
}

Beginner's Guide To Travel With Perl - Part 3

Variables

It’s time to say something about variables now. Perl has three types of variables: scalars, arrays and hashes. Let’s think of them as “things”, “lists” and “dictionaries”. All variable names are a punctuation character, a letter or underscore, and one or more alphanumeric characters or underscores in Perl.

Beginner's Guide To Travel With Perl - Part 2

Strings

Let’s say something about strings. A string is a group of characters between two single quotes or two double quotes. If the characters are bounded with single quotes, the elements are not interpreted. But if they are bounded with double quotes, it means that the contents should be interpreted.

Beginner's Guide To Travel With Perl - Part 1

Something about Perl

Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular amongst programmers. Perl borrows features from other programming languages including C, shell scripting (sh), AWK, and sed. The language provides powerful text processing facilities without the arbitrary data length limits of many contemporary Unix tools, facilitating easy manipulation of text files. Perl gained widespread popularity in the late 1990s as a CGI scripting language, in part due to its parsing abilities.

Popular Posts