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

Previous < 1 2 3 4 5 6 > Next

CGI (INTERVIEW QUESTIONS) 2
  What is the 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.

   
  How do you open a file for writing?

 Files are opened using the open and sysopen function. Either function may be passed up to 4 arguments, the first is always the file handle thenfile name also known as a URL or filepath, flags, and finally any permissions to be granted to this file.
  $FH = "filehandle";
 $FilePath = "myhtml.html";
  open(FH, $FilePath, permissions);
or
 sysopen(FH, $FileName, permission);

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

 $ indicate scalar data type

 @ indicates an array and

 % indicates an hash or an associative array.

 
  Name an instance where you used a CPAN module?

 we will get a no.of modules from CPAN, there so many module for database interface, database drivers.
to do the mathematical operations ,text processing .
each module is to handle a small tasks .

 
  What is your favorite module and why?

 My Favourite module is CGI.pm Bcoz it can handle almost all the tasks like
1. parsing the form input
2. printiing the headers
3. can handle cookies and sessions and much more

 
  I have created a CGI-based page,after entering all the values in to the fields, How to get the output on the web browser using Perl?

In the HTML form, you have to mention the perl script name.
Ex: <form action="test.pl" method="POST">. Then in the test.pl, you have to mention the content-type as print "content-type: text/html\n\n";. And read the form values and print them.

 
  Why do you program in Perl?

 It is having the features of scripting(shell) as well as programming(like c). Using perl u can easily do the system administration works where comparitively difficult with shell script.

 
  How would you replace a char in string and how do you store the number of replacements?

 $str='Hello';
 $cnt= ($str=~s/l/i/g);
 print $cnt;
  $cnt stores the number of replacements.

 

Previous < 1 2 3 4 5 6 > Next

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