in reply to How to use shared/global emory kind of feature in perl

Read "perldoc perlipc" for a start. You "could use shared memory segments, but considering your level of Perl experience, a simpler solution is to put the number into a database....or....just write it to a file somewhere, to retain it's value from script to script.

There are many fancy ways to do this, like auto spawing the next script, passing the current number as a parameter.

But show some code as to what your idea is.....I smell homework.


I'm not really a human, but I play one on earth My Petition to the Great Cosmic Conciousness
  • Comment on Re: How to use shared/global emory kind of feature in perl

Replies are listed 'Best First'.
Re^2: How to use shared/global emory kind of feature in perl
by tilly (Archbishop) on Mar 31, 2009 at 00:51 UTC
    If you wish to share between machines, you cannot use shared memory segments.
      Sure, you can..... the number can still be stored on one master machine in shared mem, controlled by a daemon, and have the daemon listen for external socket connections. The program can run over the socket.

      I'm not really a human, but I play one on earth My Petition to the Great Cosmic Conciousness
        You know as well as I do that that is not what is generally meant by sharing data using shared memory. Yes, technically shared memory is used, but what enables sharing is the client/server setup. Which takes a lot of work and doesn't change much whether or not it uses shared memory.