By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,852 Members | 2,198 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,852 IT Pros & Developers. It's quick & easy.

how to use variables or packages of one program into another

P: 51
hi,
How can we use variables or packages of one program into another.
Say my first program name is First.pl, where i write the code like this:
Expand|Select|Wrap|Line Numbers
  1.          use DBI;
  2.          use Apache::Request;
  3.         ....................................
  4.         ....................................
  5.  
  6.         my $a='hai';
  7.         print "$a \n";
  8.  
Now i want to use the same packages DBI,Apache::Request.
Also i would like to have the value of the variable in my second
program. How is it possible? Can i write something like
use folder::First; and i use the packages in my second program?


Cheers,
pavan
Jul 26 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.