Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is the procedure to define a user define module in your
perl application?

Answers were Sorted based on User's Feedback



what is the procedure to define a user define module in your perl application?..

Answer / nachikethas

Create a .pm file eg xyz.pm and you can have subroutines or
what ever you want can be placed there.

#content of xyz.pm
package xyz;
sub Printit{
print "In module xyz...";
}
1;
#end of xyz.pm

for using this perl module in ur perl program eg abc.pl

# content of abc.pl

use xyz;
xyz->Printit();

#end pf abc.pl

hope this helps :)

Is This Answer Correct ?    1 Yes 0 No

what is the procedure to define a user define module in your perl application?..

Answer / subina

Package Module_name;
require Exporter;
@ISA = qw(list of base classes);
@Export = qw(list of symbols );

#------------code---------------------



#at the end of module

1;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CGI Perl Interview Questions

explain the various functions/directives in perl that allow you to include/import a module. Also, state the differences between them.

0 Answers  


How interpreter is used in perl?

0 Answers  


What does init 5 and init 0 do?

0 Answers  


What are the different instances used in cgi overhead?

0 Answers  


What are the characteristics of a project that is well suited to Perl?

1 Answers  


How can you create an object of a class in a package?

4 Answers   IBM,


What is the easiest way to download the contents of a URL with Perl?

0 Answers  


What does read () command do?

0 Answers  


List the files in current directory sorted by size ?

0 Answers  


what r the different type of function in perl ???

1 Answers   ABC, Symphony,


write a perl script to find whether a given line of text is starting and ending with same word or not ???

2 Answers   CSS,


How to get help for perl?

0 Answers  


Categories