in reply to Re^2: Sharing in fork
in thread Sharing in fork

I dont want to use thread, for that i need to re-install my perl interpreter

Then use forks and forks::shared, which uses sockets for inter-process communication.  Believe it, there is no direct way to share variables between child and parent, because each process has its own address space.

Replies are listed 'Best First'.
Re^4: Sharing in fork
by ajeet@perl (Acolyte) on Mar 23, 2010 at 10:00 UTC
    Yeah...I am also thinking to go with fork.

    Need a clarification from your side..the situation that i described,is it well suitable to go with fork..?

    One more thing that...i tied to install forks.pm from CPAN,but it demands for some additional modules. and fails with saying something "/usr/ucb/cc: language optional software package not installed *** Error code 1 make: Fatal error: Command failed for target `forks.o' "
    I searched on Net and found something that this is problem with my C compiler, then i tried to use it without installataion, by creating some perl file in the same directory( correct me,If i am wrong) but fails to do so.
    so please,give some idea that if there is any way to use forks, without installing them, if installation is the last option then proper way to install it..

    Thanks Sir... I am on my way of getting solution

      "/usr/ucb/cc: language optional software package not installed ..."

      Sun Studio 11 (which provides cc among other things) is available for free (without being a SDN member, and - AFAICT - even without registering, these days) — currently here (613MB).

      This is the previous release, which will likely work just fine for this purpose, though.

      HTH.

      If a module needs a C compiler, it needs a C compiler. Manual installation will not work.

      Ask your system administrator to install the proper language packs and the proper C compiler for your Perl.

A reply falls below the community's threshold of quality. You may see it by logging in.