in reply to Re^2: while reading a file, transfer the same data to two different processes.
in thread while reading a file, transfer the same data to two different processes.

Shouldn't he be using eval in that case?
  • Comment on Re^3: while reading a file, transfer the same data to two different processes.
  • Download Code

Replies are listed 'Best First'.
Re^4: while reading a file, transfer the same data to two different processes.
by ikegami (Patriarch) on May 20, 2010 at 22:31 UTC
    To know what he should use would require knowing his needs, and I don't know them. eval offers far less protection than forking. eval catches exceptions. Forking catches exceptions, signals and faults. It also provide a fresh environment which clears leaks and corrupt structures.