in reply to Re^2: Object oriented mess
in thread Object oriented mess

run that through perl and see:
> perl -cw Client.pm Can't modify numeric lt (<) in scalar assignment at Client.pm line 24, + near ""#\" onclick=\"history.back()\">click here</A> to go back.</P> +"," syntax error at Client.pm line 24, near ""exit")" Client.pm had compilation errors.
Oops, copy & paste error.

Actually I think this is the problem.

Replies are listed 'Best First'.
Re^4: Object oriented mess
by longliveAJ (Acolyte) on Apr 13, 2005 at 15:18 UTC
    Hey guys,
    I have got some good pieces of advice here which is also leading to some kind of confusion.
    The problem resolved a little when I commented out the

    require ... require

    lines in Client.pm
    I am going to first heck out the Exporter module.
    But could someone tell me what is the best way to include a global(common file which has carries commonly used subroutines) file in all my packages in perl files.
    It seems that by using require and use together, is causing this error.
    Thanks
      The standard way is to put those "global" routines in their own module (that is, in Some.pm file with package Some;).

      That way you can either refer to them directly, as Some::function() or you can use Exporter to export them to other namespaces that want them (and they will also have some control over which functions/variables they'll import, if you set up Exporter correctly).