ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Scripts  >>  CGI Perl
 
 


 

 
 PHP interview questions  PHP Interview Questions
 ASP interview questions  ASP Interview Questions
 CGI Perl interview questions  CGI Perl Interview Questions
 JavaScript interview questions  JavaScript Interview Questions
 VB Script interview questions  VB Script Interview Questions
 JSP interview questions  JSP Interview Questions
 Shell Script interview questions  Shell Script Interview Questions
 Python interview questions  Python Interview Questions
 Tcl interview questions  Tcl Interview Questions
 Awk interview questions  Awk Interview Questions
 AJAX interview questions  AJAX Interview Questions
 Ruby on Rails interview questions  Ruby on Rails Interview Questions
 Scripts AllOther interview questions  Scripts AllOther Interview Questions
Question
How can you create an object of a class in a package?
 Question Submitted By :: Jay Mishra
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How can you create an object of a class in a package?
Answer
# 1
Say Pachage is My Package

package MyPackage;

sub method() {

}


Then U can create Object 

$myobject = new MyPackage();

and u can call any method of object like:

$myobject->method();
 
Is This Answer Correct ?    0 Yes 0 No
Vipul Dalwala
 
  Re: How can you create an object of a class in a package?
Answer
# 2
--Like you do in any perl programme.

package PackageName;

use RelativePath::ModuleName;# The Class as per your questn
...
...

my $object = ModuleName->new();
...
...
1;
 
Is This Answer Correct ?    0 Yes 0 No
Bhagwat Gupta
 
 
 

 
 
 
Other CGI Perl Interview Questions
 
  Question Asked @ Answers
 
How do you debug a Perl scripting ( at the compile time error or run time error) in Unix environment ?  4
How to find out the version of PERL being installed on your LINUX machine. Mind-Tree3
What purpose does each of the following serve: -w, strict, - T ?  2
How can you create an object of a class in a package? IBM2
what r the different type of function in perl ??? Symphony1
What is the difference between for & foreach, exec & system? Photon3
what is the procedure to define a user define module in your perl application? IBM1
i have a folder called 'error' and in that, i have error log files which are generated by the build, now i want to findout the string 'error' from each log file and that error has to be copied into the another file called 'analysis'. how do you do this in perl? HP4
When would you not use Perl for a project?  1
what is the difference between require and use in perl? IBM1
Why do you program in Perl?  1
What do the symbols $ @ and % mean when prefixing a variable?  1
What elements of the Perl language could you use to structure your code to allow for maximum re-use and maximum readability?  1
Explain the difference between my and local?  1
Name an instance where you used a CPAN module? TCS3
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  4
How do you open a file for writing?  4
how to install a package in perl ????  1
What arguments do you frequently use for the Perl interpreter and what do they mean?  1
what r the future opportunities in PERL/LINUX after 3 years ??  2
 
For more CGI Perl Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com