how to use variables or packages of one program into another

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pavanponnapalli
    New Member
    • May 2008
    • 51

    how to use variables or packages of one program into another

    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:
    Code:
             use DBI;
             use Apache::Request;
            ....................................
            ....................................
    
            my $a='hai';
            print "$a \n";
    Now i want to use the same packages DBI,Apache::Req uest.
    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
Working...