Quantcast
Channel: perl – Coding School
Browsing latest articles
Browse All 15 View Live

Perl ARGV

@ARGV and %ENV The built-in array @ARGV contains the command line arguments for a Perl program. The following run of the Perl program critic.pl will have the ARGV array (“-poetry”, “poem.txt”). unix%...

View Article



Perl Loop

The Loop Statements Different loop statements in perl… The for Loop The foreach Loop The while Loop The do-while Loop The until Loop The process of executing a code block repetitively is known as...

View Article

Perl if else

The if…else Statement This statement uses a relational expression to check the validity of a condition and execute a set of statements enclosed in braces. It returns a Boolean value, true or false,...

View Article

Perl References

Perl References I’m happiest writing Perl code that does not use references because they always give me a mild headache. Here’s the short version of how they work. The backslash operator () computes a...

View Article

Perl Subroutine

Perl Subroutine sub mysubroutine { print "Not a very interesting routinen"; print "This does the same thing every timen"; } regardless of any parameters that we may want to pass to it. All of the...

View Article


Perl Regular Expressions

Perl Regular Expressions Metacharacters char meaning ^ beginning of string $ end of string . any character except newline * match 0 or more times + match 1 or more times ? match 0 or 1 times; or:...

View Article

Perl File Operations

Perl File operations Variables which represent files are called “file handles”, and they are handled differently from other variables. They do not begin with any special character — they are just...

View Article

Perl OOP

Perl OOP Why Object Oriented approach? A major factor in the invention of Object-Oriented approach is to remove some of the flaws encountered with the procedural approach. In OOP, data is treated as a...

View Article


Image may be NSFW.
Clik here to view.

Perl DBI

Perl DBI Example The DBI module enables your Perl applications to access multiple database types transparently. You can connect to MySQL, MSSQL, Oracle, Informix, Sybase, ODBC etc. without having to...

View Article


Perl Signals

Perl Signals Perl allows you to trap signals using the %SIG associative array. Using the signals you want to trap as the key, you can assign a subroutine to that signal. The %SIG array will only...

View Article

Perl List

List A list is a sequence of scalar values enclosed in parentheses. The following is a simple example of a list: (1, 5.3, “hello”, 2) This list contains four elements, each of which is a scalar value:...

View Article

Perl Operators

Perl Operators In Perl, the comparison operators are divided into two classes: Comparison operators that work with numbers Comparison operators that work with strings Integer-Comparison Operators...

View Article

Perl Arrays

Arrays @ Array constants are specified using parenthesis ( ) and the elements are separated with commas. Perl arrays are like lists or collections in other languages since they can grow and shrink, but...

View Article


Perl Hash Maps

Perl Hash Maps/associative arrays ASSIGNING HASH VALUES hash tables consist of key/value pairs every key is followed by a value values can be assigned to hash tables as %states=...

View Article

Perl Intro

Introduction to Perl Perl is an acronym, short for Practical Extraction and Report Language. It was designed by Larry Wall as a tool for writing programs in the UNIX environment (Perl is a stable,...

View Article

Browsing latest articles
Browse All 15 View Live




Latest Images