SURESHKUMAR.NET FORUMS
Registered Member Login:
Not a member? Register today!



Welcome to the SURESHKUMAR.NET FORUMS.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.




perl python mysql Interview / Technical Questions Kindly solve an many as questions you can. It will sharpen your skills and those solutions will help others too.

Perl - what's is the use of 'require'

        

Reply
 
LinkBack Thread Tools Display Modes
Old 26-01-07, 11:53 AM   #1 (permalink)
Junior Member
 
preethisingh's Avatar
 
Join Date: Jul 2006
Posts: 1,391
Thanks: 1
Thanked 32 Times in 29 Posts
Rep Power: 20 preethisingh is a jewel in the rough preethisingh is a jewel in the rough preethisingh is a jewel in the rough preethisingh is a jewel in the rough
Perl - what's is the use of 'require'

what's is the use of 'require' and what does this mean?

preethisingh is offline Offline   Reply With Quote
Old 13-03-08, 01:09 AM   #2 (permalink)
Junior Member
 
Join Date: Feb 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 3 ishadalwadi is on a distinguished road
Re: Perl - what's is the use of 'require'

require() reads a file containing Perl code and compiles it. Before attempting to load the file it looks up the argument in %INC to see whether it has already been loaded. If it has, require() just returns without doing a thing. Otherwise an attempt will be made to load and compile the file.
require() has to find the file it has to load. If the argument is a full path to the file, it just tries to read it. For example:
require "/home/httpd/perl/mylibs.pl";

If the path is relative, require() will attempt to search for the file in all the directories listed in @INC. For example:
require "mylibs.pl";
ishadalwadi is offline Offline   Reply With Quote
Reply

Tags
perl , require


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
tech links AjayKumar.Kataram Latest Tech News & Innovations 12 11-04-07 04:00 PM
Perl - Advantages of C over perl? preethisingh perl python mysql Interview / Technical Questions 0 26-01-07 11:53 AM
Perl - When do you not use PERL for a project? preethisingh perl python mysql Interview / Technical Questions 0 26-01-07 11:52 AM
Position Vacant PERL Developers sridhar Experienced Jobs 0 06-12-06 05:13 PM
Interglobe Technologies: Software Developer C Perl sridhar Experienced Jobs 0 19-07-06 05:27 PM


All times are GMT +6.5. The time now is 06:12 PM.

More Interview Questions Here...

Content Relevant URLs by vBSEO 3.3.2