in reply to can a perl script act as a daemon to serve data in its symbol table?

You seem to be reinventing the concept of a cache daemon. Perhaps you could use memcached? It has a nice Perl interface and is very fast.

-sam

  • Comment on Re: can a perl script act as a daemon to serve data in its symbol table?

Replies are listed 'Best First'.
Re^2: can a perl script act as a daemon to serve data in its symbol table?
by leocharre (Priest) on Feb 02, 2006 at 21:47 UTC

    this is good.. real good, you saved me, sam-

    I still want to know though .. as a sidenote.. just to know.. how would one... if i have foo.pl running and waiting on the box. how could bar.pl access foo.pl's present namespace ? can it ?

    my $name = &foo.pl::main::Freaky($h1+3); # muhahhahaha
      Well, sure, that's more-or-less exactly what memcached is doing. You could write memcached in Perl and call it foo.pl if you wanted. I think you might be focusing too much on Perl's namespace. Perl namespaces are just hashes, just the same as the hash that memcached supports, so all the same techniques apply.

      If you want to learn more about networking with Perl, I suggest you pick up a copy of Network Programming with Perl. I'm sure it has examples of the kind of thing you're talking about.

      -sam