Home | About Us | Contact Us | Terms Of Use
Perl is an interpreted language that is optimized for string manipulation, I/O, and system tasksPerl is a script programming language that is similar in syntax to the C language and that includes a number of popular UNIX facilities such as sed, awk, and tr. Perl is an interpreted language that can optionally be compiled just before execution into either C code or cross-platform bytecode. When compiled, a Perl program is almost (but not quite) as fast as a fully precompiled C language program. Perl is regarded as a good choice for developing common gateway interface (CGI) programs because it has good text manipulation facilities (although it also handles binary files). It was invented by Larry Wall.
PERL Interviews are getting tough these days as the technology grows faster. To get through the PERL interview one needs to update him/herself in a regular manner. Having said that, just before the interview, it is very important to have a quick glance of the reputed PERL questions and answers to make yourself comfortable during the interview process. This is where DoAnswers.com helps you in renewing yourself on PERL and various other technologies interview preparation.
21. what is meant 'die' in a perl program?
If the condition defined before the DIE statement is NOT met, the script will stop execution at that point, printing out the default error, if a custom error message is not defined. goto end block if end block exists END{}, execute commands in end block, exit script
22. what is meant by 'chomp'? where do we require this ?
chomp is used to eliminate the new line character. It can used in many different scenarios. For ex: excuteScript.pl firstArgument. $firstArg = $ARGV[0]; chomp $firstArg; --> to get rid of the carrige return.
23. what is meant by a 'pack' in perl?
Pack Converts a list into a binary representation Takes an array or list of values and packs it into a binary structure, returning the string containing the structure
24. What is the difference between a perl program and a shell script? Which out of these is easier to understand and execute? And How?
Perl is similar to C language. It is rich in functions.The syntax in perl is same as in C, each stmnt should be ended with ";" semicolon.Perl is extraction report language, mean to say that it handles Regular Expressions! .Shell script is set of commands with variuos options. regardssubbu malepatiBlore.
25. what is the use of "STDERR()"?
STDERRThe special filehandle for standard error in any package.
26. what's is the use of 'require' and what does this mean?
require is a call to an external essential script or module, without which the current script/program will not proceed any further
27. what's the purpose of -w.strict,-T?
-w option enables warning.use strict pragma is used then you should declare variables before there use.
28. What's the significance of @ISA, @EXPORT @EXPORT_OK
%EXPORT_TAGS list & hashes in a perl package? With example? @ISA -> each package has its own @ISA array. this array keep track of classes it is inheriting. ex: package child; @ISA=( parentclass); @EXPORT this array stores the subroutins to be exported from a module. @EXPORT_OK this array stores the the subroutins to be exported only on request.
29. what's your experience of interfacing perl to database?
DBI
30. when do you not use PERL for a project?
When: - There's a lot of text processing - Web-based applications - Fast/expidient development - Shell scripts grow into libraries - Heavy Data manipulation (auditing, accounting, checking etc... backend processing) - Data extraction - transform - loading (database etc.) - System admin etc...