in reply to require issue.

There are so many ways to do this that it's impossible to give any help without seeing code. Can you produce a cut-down version of the three files (no more than twenty or thirty lines total) that demonstrates the problem.

Replies are listed 'Best First'.
Re^2: require issue.
by siva kumar (Pilgrim) on Mar 02, 2007 at 12:19 UTC
    Hi .. I tried to resolve and have the sample programs.. "Ant" correct me if I am wrong
    main.pl
    require "somefile.pl"; use newform; &someFile(); &newform::func1();
    somefile.pl
    sub someFile { print "LAMP"; } sub someFile1 { print "J2EE"; } 1;
    newform.pm
    package newform; require "somefile.pl"; sub func1 { &someFile1(); print "Inside func1"; } 1;
    while trying to run main.pl, getting the following error
    Undefined subroutine &main::someFile called at s1.pl line 5.