Women in Technology

Hear us Roar



Article:
  Using Shared Memory from PHP
Subject:   ipc with perl
Date:   2004-05-17 06:42:56
From:   cluedon
since this showed up on perl.com with a php title I thought I'd post some information about how to do this sort of thing with perl.


check out http://search.cpan.org/~maurice/IPC-ShareLite-0.09/ShareLite.pm


example code:


$share = new IPC::ShareLite( -key=>1971,
-create=>'yes',
-destroy=>'no' ) or die $!;



$share->lock();
$share->store("This is going in shared memory");
$share->unlock;



$str = $share->fetch();