Loading ...
Sorry, an error occurred while loading the content.

Re: subroutines in seperate files-How do I do it?

Expand Messages
  • zoom29@netzero.net
    ... Thanks that works, but I had to change the package line in the module from package cgibin::reader; to package reader; Your solution is more
    Message 1 of 2 , Jun 2, 2001
    • 0 Attachment
      --- In perl-beginner@y..., "Charles K. Clarkson" <c_clarkson@h...>
      wrote:

      > You can install a module anywhere you want and
      > use 'use lib' to tell perl where it is:
      >
      > use lib '../modules';
      > use myModule;
      >
      > Assuming myModule.pm is in ../modules.


      Thanks that works, but I had to change the package line in the module

      from
      package cgibin::reader;

      to
      package reader;


      Your solution is more straightforward than using MakeMaker. Thanks.


      Another question if I may, regarding filehandles.

      I am opening a socket for communication
      i.e.
      print TOSERVER "blah blah\n";
      $::buf=<TOSERVER>;

      and using print STDOUT to display program progess/debug info.

      When I run through the debugger, I get the info on the screen I
      expect.
      When I run without the debugger, I don't get output AND I get a
      message "print() on closed filehandle......"

      I tried changing STDOUT to STDERR but it is the same.

      Any ideas?
    Your message has been successfully submitted and would be delivered to recipients shortly.