Monday, May 5, 2008

Great words

It's not birth, family, cast, riches, intelligence or money that take you to places. It's sheer hard work that takes you to greater heights. If you have the will, you can become whatever you want. No power on the earth can stop a sincere worker.
-Teja, Telugu film maker

You have to dream before your dreams can come true.
- Abdul Kalam, Former president of India
---------
More quotes

Tuesday, April 15, 2008

Stack:
Stack is a important data structure In Perl programming, and can be implemented using LIFO technique. i.e., the Last thing In is the First thing Out. So from the above demonstration(refer Figure 1.1), it's learnt that Stacks can be implemented using PUSH and POP commands.

Queue:
The queue is another data structure. A physical analogy for a queue is a line at a bank. When you go to the bank, customers go to the rear (end) of the line and customers come off of the line (i.e., are serviced) from the front of the line. So from the above demonstration(refer Figure 1.1), we can say that Queues can be implemented using PUSH and SHIFT.

Subroutines in Perl

There are three different formats to be used for calling the subroutines/methods,
"hello" is the subroutine name, say

1) &hello;
Subroutine definition can be made anywhere in the file.
& is to tell compiler that, hello is a subroutine.

2) hello();
Subroutine definition can be made anywhere in the file.
() is tell compiler that, hello is a subroutine.

3) hello;
Subroutine definitions should be made before invocation
If you have a subroutine definition after the invocation; at least you need to declare it with "sub hello;" before invocation.
here sub is tell compiler that, there would be a subroutine named hello anywhere in the file.