+91 90691 39140 | +1 253 214 3115 | info@hub4tech.com | hub4tech

Perl Interview Questions and Answers

List the programming guidelines that must be followed when programming with Perl modules:
  • The Module and the package name must be the same.
  • When referring to a package name, it must ALWAYS begin with a capital letter.
  • The only allowable package name needs to have the extension “.pm”.
  • The package must be derived from the exporter class when no object-oriented technique is used.
  • When no object-oriented techniques are used, the module must export all functions utilising the @EXPORT and @EXPOR_OK methods.
Explain Perl. When do you use Perl for programming? What are the advantages of programming in Perl?

PERL is Practical Extraction and Reporting language, which is a high level programming language written by Larry Wall. The more recent expansion is Pathologically Eclectic Rubbish Lister .

PERL is a free open source language.

It is simple to learn as its syntax is similar to C

It supports OOP – Object oriented programming like C++

Unlike C/ C++ it is a lot more flexible in usage

When do we use PERL for Programming:

Generally PERL is used to develop web based applications even though libraries are available to program web server applications, database interfaces and networking components. Example: The popular e-commerce site www.amazon.com was developed with PERL.

Advantages of programming in Perl

As mentioned above, PERL

  • is easier to understand due to its simple syntax
  • is easier to use due to its flexibility
  • supports OOP
  • is easily readable
What factors do you take into consideration to decide if Perl is a suitable programming language for a situation?

If the project requires OOP programming but requires faster execution

If the application to be developed is web based, Perl provides a lot of flexibility in programming such applications and is most popularly used.

Cost – As PERL is free, we can save on the cost of acquiring license for the programming language.

If the deadline is near, we can use CPAN, the Comprehensive Perl Archive Network, which is one of the largest repositories of free code in the world. If you need a particular type of functionality, chances are there are several options on the CPAN, and there are no fees or ongoing costs for using it.

How is it determined if Perl is suitable for a programming need?

Perl is best used in programs that require rapid execution. Perl is also ideal for web-based applications that are defined by a certain amount of flexibility. As Perl is considered freeware, it is highly appropriate for programming needs that are under strict budgetary guidelines. One way to understand your programming needs is by using flowcharts and pseudocode.

How can we create Perl programs in UNIX, Windows NT, Macintosh and OS/2 ?

“Emacs” or “vi” can be used in UNIX and in Windows NT we can use “notepad”. In Macintosh we can use MacPerl’s text editor or any other text editor and in OS/2, e or epm can be used

Copyright ©2015 Hub4Tech.com, All Rights Reserved. Hub4Tech™ is registered trademark of Hub4tech Portal Services Pvt. Ltd.
All trademarks and logos appearing on this website are the property of their respective owners.