Skip to main content

Perl programming #1

Perl is a programming language. This is a powerful language which has features similar "C". This is generally used for text processing. "Perl" is not an acronym officially, but, it has got backronyms(may be invented with a false etymology)  in use such as "Practical Extraction and Reporting Language".

In Biotechnology, this Perl is used generally for processing text data of DNA sequences and converting them to mRNA or searching for a specific pattern in a protein sequence etc.,

I'm gonna write a series "Perl programming #1, #2, #3 etc.. with simple programs and explanations. Wanna learn perl with me? Let's begin from today. I'm sure, atleast you will get to know the Basics of perl. You can learn a programming language, of course, free of cost, with in a weak!!!

What you need for perl programming?

PERL and UNIX:
If you work in UNIX, you need not install perl, just  go to terminal, and you could create a perl file just by typing as follows,

vi filename.pl

This will open a perl file, in which you can type your code.

save the file, then, type

./filename.pl 

for compiling. This will show you the errors (if any) else, the code will be executed.

PERL AND WINDOWS:

Windows users must install perl as it doesn't have perl installed by default.Use this link (http://www.activestate.com/activeperl/downloads) for downloading "active perl" based on the version of windows your working with i.e, windows xp, windows 7, download accordingly.


Download perl according to the O.S

Just download, save, run. It's very simple to install. (But, check with the O.S. and bit of the o.s. windows has 32 bit, 64 bit... check that first before downloading)

Then, go to command line,
check the directory, where you are.
for creating a perl file, type as follows,

perl >>filename.pl


command prompt - creating perl file




































This will create a file with the name  "filename.pl"

Now, "close" the command line, and, go to the folder containing your perl file, right click it, click the option "edit" and it will open like a text editor where you can type your perl code and "save".

then, come again to the command line and execute by typing,

perl filename.pl

This will show you the errors else the program will be executed.

Let us start with a simple code

just a print statement:

type as follows:

print "hello";

this will give the output as

hello

This is enough for today, let's learn the next chapter by tomorrow! :)

Happy perl -ing  :D :)

Comments

Popular posts from this blog

Sea Butterfly!

Neih hou!  Don't roll you eyes wondering what it is! "Neih hou" is how you say "hello" in Cantonese. Guess what, I am in Hong Kong and therefore the language Cantonese. I came to Hong Kong this summer as an intern before officially joining as a PhD Student. This is my second experience abroad, far away from home, new language, new culture, I expected me to have a "really" bad cultural shock, but, actually I experienced only 50% of what I expected. For a girl who have used the marina beach only for eating "sundal", bikini in beach was a shock (FEEL FREE TO JUDGE ME!). The first time, I went to the big wave beach here, I was the only one who was totally covered, when everyone was enjoying their Beer, I was slowly sipping my lemon juice (THE ODD ONE OUT!). I realized how beautifully different the world outside is! There is no single standard for right or wrong, it varies in different countries, in different regions around the world. And it ...

The Butterfly flew for the first time!

Hi dear sweet lovely reader, Didn't meet you for a long time... Just after complaining about the stipend problem in the last post, I actually wanted to write a lot here, but, couldn't find time (Such a lazy girl, I am!). As you might be knowing, the author (me) is the butterfly here :P And, I flew for the first time!! YEAH! I FLEW! I flew like a butterfly! It was an awesome experience flying for the very first time! (ow, no! I dint put a trans-gene in my body and fly after getting  a pair of wings, but with a passport and VISA). I'm this girl, full of dreams wishing to do "this", "that" and "all kind of stuffs that one can do". And, one among those dreams was to fly one day! TO FLY FREE!(I mean, not free of cost :P, but liberation) I always wanted to fly in those big, big airplanes, but, I always have avoided that mode of transport. Reason? Obviously, it would burn a big hole in my dad's pocket (actually he can afford if I wan...

Plant Tissue culture - Basics

Hi, I know a bit about Plant tissue culture and I would like to share it here. Plant Tissue culture Rack Plant Tissue culture, to be simple, it is growing plants in laboratory (invitro). To be more simple, you grow plants in test tubes and bottles by providing them light, nutrient by mimicking the natural conditions. It is effectively used as tool for producing GM(Genetically Modified) plants. Don't confuse "plant tissue culture" with "HORTICULTURE" The basic of Plant Tissue Culture : Totipotency:  The ability of a single plant cell to grow into an entire plant is generally referred as totipotency. Plasticity:  The ability of plants to survive in extreme conditions by modifying their metabolism is generally referred as plasticity. Things you need to do plant tissue culture 1) Laminar air hood 2) Plant growth chamber 3)Chemicals for preparing medium 4)Autoclave 5)pH meter 6) Test tubes or Bottles with caps 7) Cotton plugs 8) Scalpels, Fo...