in reply to while reading a file, transfer the same data to two different processes.
Can't you use some sort of IPC(sockets, FIFOs, Pipes.,). So, you can send the read data to both processes.
In Section
Seekers of Perl Wisdom
in reply to while reading a file, transfer the same data to two different processes.