Since I was drowning myself in making the student portal I’ll postpone the lot picking for now and jot down a few things that I learned for fun and move on
Okay, So the random language for today is Perl. The language having a camel as its icon?!
Perl is a general-purpose programming language originally developed for text manipulation and now used for a wide range of tasks including system administration, web development, network programming, GUI development, and more.
Programs written in Perl are called Perl scripts, whereas the term the Perl program refers to the system program named Perl for executing Perl scripts. (What, confused already?)
If you have used shell scripts or awk or sed or similar (Unix) utilities for various purposes, you will find that you can normally use Perl for those and many other purposes, and the code tends to be more compact. And if you haven’t used such utilities but have started thinking you might have a need for them, then perhaps what you really need to learn is Perl instead of all kinds of utilities.
Perl is implemented as an interpreted (not compiled) language. Thus, the execution of a Perl script tends to use more CPU time than a corresponding C program, for instance. On the other hand, computers tend to get faster and faster, and writing something in Perl instead of C tends to save your time.
Assuming that Perl is correctly installed and working on your system, the simplest way to run a Perl program is to type the following:
The filename should be replaced by the name of the program that you are trying to run or execute. If you created a test.pl file while reading the previous section, you can run it like this: perl test.pl
It is very important to place comments into your Perl programs. Comments will enable you to figure out the intent behind the mechanics of your program. For example, it is very easy to understand that your program adds 69 to another value. But, in two years, you may forget how you derived the number 69 in the first place.
Comments are placed inside a program file using the # character. Everything after the # is ignored. For example comment.pl:
# This whole line is ignored.
Okay moving on… since I kinda don’t have time to go into details… What did I do to consider learning Perl as a programming language? If I remember correctly Perl was my first scripting language which I learned a year back… WHY? Cause I wanted to know why the camel was it’s icon.
On a more serious note, Perl is like any other scripting language with variables with automatic types, arrays, loops, conditionals, operators bleh-ble-bleh!!
What’s special about Perl?