Practical Extraction and Reporting Language Interview Questions and Answers

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.



Next >>

 

1. advantages of C over perl?

In reality PERL interpreter is written in C. So what all advantages C have are also possesed by PERL. Otherwise C is faster than PERL, because PERL is an interpreted language.


2. Difference between for & foreach,exec & system?

Technically, there's no difference between for and foreach other than some style issues. One is an alias of another. You can do things like this foreach (my $i = 0; $i < 3; ++$i) { # normally this is foreach print $i, "n";} for my $i (0 .. 2) { # normally this is for print $i, "n";} - exec runs the given process, switches to its name and never returns while system forks off the given process, waits for it to complete and then returns.


3. Explain the difference between "my" and "local" variable scope declarations. ?

Both of them are used to declare local variables. The variables declared with "my" can live only within the block it was defined and cannot get its visibility inherited functions called within that block, but one defined with "local" can live within the block and have its visibility in the functions called within that block. The variables declared with my() are visible only within the scope of the block which names them. They are not visible outside of this block, not even in routines or blocks that it calls. local() variables, on the other hand, are visible to routines that are called from the block where they are declared. Neither is visible after the end (the final closing curly brace) of the block at all.


4. Here is a Perl Problem that was posed to me. I was given one day time to solve. Unfortunately I did not know enough Perl to do it. And sadly, I did not get selected. However I wish to share this question with all. Please pose your answers or programs on t

think the problem is straight forward and should be very simple to write a perl program for the same, below is the program. i havent run it to check if it works fine. comments are welcome 1. Assuming table 1 having the address has a structure address_tbl (mailaddress char(255)) 2. Assuming table 2 having the count of domains has a structure domain_count_tbl (domain char(255), count int) ========================================================================================= @maillist = query("select * from address_tbl") for(i=0;i< } ) domain='$key")' where count="mylist[$key]" set domain_count_tbl query(update { else values(?$key?,mylist[$key])) into query(insert 0 (scalar(@res)="=" if from 1 @res='query("select' %mylist) (keys $key foreach mylist[domain]++ myvar[i]) (name,domain)="split(/@/,">


5. how do you connect to database in perl

There is DBI module.use DBI;my $dbh = DBI->connect('dbi:Oracle:orcl', 'username', 'password',)where username and password is yours. THis is exmaple for oracle database.


Your Ad Here

6. How to Connect with SqlServer from perl and how to display database table info?

Dear folks, there is a module in perl named DBI - Database independent interface which will be used to connect to any database by using same code. Along with DBI we should use database specific module here it is SQL server. for MSaccess it is DBD::ODBC, for MySQL it is DBD::mysql driver, for integrating oracle with perl use DBD::oracle driver is used. IIy for SQL server there are avilabale many custom defined ppm( perl package manager) like Win32::ODBC, mssql::oleDB etc.so, together with DBI, mssql::oleDB we can access SQL server database from perl. the commands to access database is same for any database.


7. I have a variable named $objref which is defined in main package. I want to make it as a Object of Class XYZ. How could I do it?

use XYZ; my $objref= XYZ->new();


8. Name an instance you used in CPAN module?

CGI, DBI etc are very common packages used from CPAN. there are thousands of other useful modules.


9. perl regular expressions are greedy what does this mean?

Perl regular expressions normally match the longest string possible. that is what is called as "greedy match" For instance:my($text) = "mississippi";$text =~ m/(i.*s)/;print $1 . "\n";Run the preceding code, and here's what you get:ississIt matches the first i, the last s, and everything in between them. But what if you want to match the first i to the s most closely following it? Use this code:my($text) = "mississippi";$text =~ m/(i.*?s)/;print $1 . "\n";Now look what the code produces:is Perl regular expressions normally match the longest string possible. For instance: my($text) = "mississippi";$text =~ m/(i.*s)/;print $1 . "\n";Run the preceding code, and here's what you get: ississ they are created in.


10. what are regular expressions?

a code line that defines a pattern for a search to match


Your Ad Here

Next >>

 
Databases Questions and Answers
 
DB2 Interview Questions and Answers
IMS Interview Questions and Answers
MYSQL Interview Questions and Answers
Oracle Interview Questions and Answers
PL/SQL Interview Questions And Answers
Quel Interview Questions and Answers
SQL Interview Questions and Answers

 
 
.NET Interview Questions and Answers
 
ASP Interview Questions and Answers
C# Interview Questions and Answers
Visual Basic Interview Questions and Answers
 
J2EE Interview Questions and Answers
 
Enterprise Java Beans (EJB) Interview Questions And Answers
Hibernate Interview Questions And Answers
Jave Messaging Service (JMS) Interview Questions And Answers
Jave Server Faces (JSF) Interview Questions And Answers
Java Server Pages (JSP) Interview Questions And Answers
Servlets Interview Questions And Answers
Spring Framework Interview Questions And Answers
Struts Framework Interview Questions And Answers
 
JAVA Interview Questions and Answers
 
Core Java Interview Questions and Answers
Java Platform, Micro Edition (Java ME) Interview Questions And Answers
JAVA GUI Interview Questions and Answers
Java Performance Tuning Interview Questions And Answers
JUnit Interview Questions And Answers
Remote Method Invocation (RMI) Interview Questions And Answers
Unified Modeling Language (UML) Interview Questions And Answers
 
Java Application Server Interview Questions And Answers
 
Tomcat Application Server Interview Questions And Answers
WebLogic Application Server Interview Questions And Answers
 
Mainframe Interview Questions and Answers
 
CICS Interview Questions and Answers
COBOL Interview Questions and Answers
IMS Interview Questions and Answers
JCL Interview Questions and Answers
REXX Interview Questions and Answers
TELON Interview Questions and Answers
VSAM Interview Questions and Answers
 
Object Oriented Language Questions and Answers
 
C Interview Questions and Answers
C++ Interview Questions and Answers
Eiffel Interview Questions and Answers
J2EE Interview Questions and Answers
JAVA Interview Questions and Answers
Sather Interview Questions and Answers
Small talk Interview Questions and Answers
 
Operation Systems Interview Questions and Answers
 
MS DOS Interview Questions and Answers
Unix OS Interview Questions and Answers
Windows Interview Questions and Answers
 
Scripting languages Interview Questions and Answers
 
Java Script Interview Questions and Answers
Practical Extraction and Reporting Language Interview Questions and Answers
PHP Interview Questions and Answers
VBScript Interview Questions and Answers
 
UserInterfaces Questions and Answers
 
Foxit Interview Questions and Answers
Glade Interview Questions and Answers
Tweak Interview Questions and Answers
 
WEB Technologies Questions and Answers
 
AJAX Interview Questions and Answers
HTML Interview Questions and Answers
WML Interview Questions and Answers
XML Interview Questions and Answers
 
Interview Tips And Some Common Questions
 
Behavioral Interview Questions And Answers


Your Ad Here