Hello World!

Welcome to my site. I use this site as a repository to dump knowledge I come across, generally in the areas of software engineering and information technologies, but may include other miscellaneous tidbits. Most of the posts are written as notes for my personal reference.

 

if i.hear then
i.forget
if i.see then
i.remember
if i.do then
i.understand

Latest articles

Perl Modules

The properties of Perl Modules: Modules either come with Perl or can be downloaded from CSPAN Modules can also be custom written Libraries also exist, but the difference is: Libraries mostly contain similar subroutines Modules is like a “smart library” – offers collection of subroutines that act as if they were build in functions Modules […]

Read article : Perl Modules

Control Structures in Perl

The “unless” control structure Opposite of the “if” condition Only executes the code block if the condition is FALSE # UNLESS Control Structure $_ = “foey foo foobar!”; unless (/foobarz/) { print “Inside of UNLESS block \n”; } # this prints unless (/foobar/) { print “Inside of UNLESS block \n”; } # this does NOT […]

Read article : Control Structures in Perl

Regular Expressions

Regular expressions, often called pattern in Perl, is a template that either matches or doesn’t match a given string. Metacharacters o When referencing groups, remember that perl takes the last group value . # match any single character except newline \ # use literal value of next character * # quantifier, match zero or more […]

Read article : Regular Expressions

Hashes in Perl

Hash is an associative array o A data structure with key – value, where the key is a unique string o Perl processes big hashes just as fast as small ones. Hashes are most useful when dealing with Finding duplicates Unique Cross reference Lookup table Hash expression: $hash{$key} = $value; $hash{$key} .= $hash{$key2}; #creates key […]

Read article : Hashes in Perl

Subroutines in Perl

Defining Subroutines o Use the keyword sub o Subroutines can have ampersand (&) in the front of the name or not o By default, all subroutines are global (public); requires advanced methods to make them private o Two of the exact same subroutine names can be defined, but the first one is overrided by the […]

Read article : Subroutines in Perl

Lists and Arrays in Perl

Scalar represents “singular” in Perl. The “plural” are represented through Lists and Arrays List is an ordered collection of scalars Array is a variable that contains a list Element of an array or list is a separate scalar variable List is the data, array is the variable representing the list. There are no size limits […]

Read article : Lists and Arrays in Perl

Perl Language Overview

Introduction Using Perl version 5.10 (five.ten) Perl = Practical Extraction and Report Language (only one of many names people use to call it) Larry Wall – creator 1980s – heavily uses Unix commands Use shell or awk programming with advanced tools like grep, cut, sort and sed but without having the complexities of a language […]

Read article : Perl Language Overview