Perl Programming Question:
Download Questions PDF

Why do you use Perl?

Answers:

* Perl is a powerful free interpreter.
* Perl is portable, flexible and easy to learn.

perl is generally more powerful and efficient than shells. It is designed for a different purpose (pattern extraction and reporting, hence its name). Shells are designed both for scripting and for running commands interactively. Shells require many other subcommands (grep, sed, awk, tr, cat, ls, find, etc...) to perform various tasks, whereas perl can do all of this itself, which means it doesn't have to fork() subprocesses. It has advanced data structure support (multi-subscripted arrays, hashes, etc.), which shells generally don't.

I generally do small jobs in shell, medium jobs in awk, and bigger jobs in perl.

Download Perl Programming Interview Questions And Answers PDF

Previous QuestionNext Question
How do I set environment variables in Perl programs?How do you give functions private variables that retain their values between calls?