Home | Contact Us | Log In | Help
HOME NEW LISTING MOST POPULAR HIGHEST RATED SCRIPTS ADD SCRIPT DOWNLOADS FORUM
Tutorials
  ASP.Net & C#
  ASP
  Perl and PHP
  Java Scripts
  C and C++
  Ajax Tutorials
  J2ee, J2Me, Java
  Python & Ruby Rail
  Crystal Report
  Sap
  CGI
  XML
  Cold Fusion & CFML
  HTML, DHTML & CSS
  Dreamweaver
  FLASH
  Photoshop/Web Designing
  Tools & Utilities
  Oracle/D2K
  Sql Server
  MySql
  Domain Name Registration
  Remotely Hosting
  Web/Server Application
  Hotel Marketing
  Internet and Law
   Search Engine Optimization/SEO
E-Commerce
Interview Questions
< 1 2 3 4 5 > Next
Perl and PHP (INTERVIEW QUESTIONS) 1
  Comparison between Servlets and CGI Scitpting technologies.

A CGI scripts is a program that is written in C,C++,or Perl.A CGI script gets executed in a server.When a aserver receives a request from the client for processing data,the server passes the request to the CGI script.The CGI script processes the request and sends the output in the form of HTML to the server.The server in turn passess the request to the client.
  The disadvantages of using a CGI script are as follows:
    a)Whenever a CGI script is involked,the server creates a separate process for it.The server has a limitation on the number of processes that can be created simultaneously.If the number of requests is too high,the server will not be able to accept the requests.In addition,creation of too many processes will also bring down the efficiency of the server.
    b)The most popular platform for writing a CGI script is Perl.Even though Perl is a very powerful language for writing CGI applications.the server needs to load the Perl interpreter for each request that it receives.Thus,for an incoming request,the executable file of the CGI script and the Perl interpreter are loaded,which brings down the efficiency of the server. Unlike CGI scripts,the servlet initialization code is executed only once.In the case of servlets,each request is handled by a aseparate thread in the Web server.This helps to make the Web server more efficient by preventing creation of unnecessary processes.

   
  What are the uses of Servlets?

  A servlet can handle multiple requests concurrently, and can synchronize requests. This allows servlets to support systems such as on-line conferencing. Servlets can forward requests to other servers and servlets. Thus servlets can be used to balance load among several servers that mirror the same content, and to partition a single logical service over several servers, according to task.

 
  What is true regarding the uses of servlets?

  A) A servlet can handle multiple requests concurrently, and can synchronize requests. This allows servlets to support systems such as on-line conferencing.
  B) Servlets can forward requests to other servers and servlets.
  C) Servlets can be used to balance load among several servers that mirror the same content, and to partition a single logical service over several servers, according to task type or organizational boundaries.
  D) All of the above.

 
  Write a simple (common) regular expression to match an IP address, e-mail address, city-state-zipcode combination.

This is a bad idea. An e-mail address is much harder than /^[\w\.]+\@\[\w\.]+\.[com|net|org]$/ - Check out RFC822 for more info. Same thing with city-state-zip. Rural addresses will blow you out of the water.

 
  What do the symbols $ @ and % mean when prefixing a variable?

 Answer:
  $ is used for a normal variable or scalar variable.
  @ is for an index array.
  % is for associative array or Hash.

 
  How do you open a file for writing?

  open ("FH", ">filename.dat") || die "Can't create the file\n";
  Later use FH to perform all file realted operation.

 
  What does the command 'use strict' do and why should you use it?

 As we know that in PERL there is no need to define the variable prior to use. Sometime while dealing with a bulky code spelling mistake can cause a big trouble. For example
#!/usr/bin/perl
$input = 5;
print $ipnut,"\n";
this code will get executed without any error but the result would be something other than 5.
To avoid such issues we genraly use:
this code will get executed without any error but the result would be something other than 5.
To avoid such issues we genraly use:
This would throw an error at the time of execution. As '$ipnut' is not defined anywhere in the code.

 
  Explain the difference between my and local.

 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.

 
  Explain the difference between use and require.

  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.

 

< 1 2 3 4 5 > Next

  Copyright 2000-2006 © SoloScript.com, All rights reserved.