I have a question about filehandles, even after reading the docs... I know how to start a subprocess from perl and read from it. But how do I write to the parent process that started me, the perl script?
I have tcl script from somewhere that calls a perl script I'm writing. The tcl script says: set channel [open |./randomize RDONLY] It calls the perl script "randomize" which reads from a file, does things to the content and should make it available for reading from the tcl script. But how do I do that? Somehow I keep on getting messages that the input is empty when I run the tcl script.
This would be what "randomize" looks like: open INPUT, "inputfile"; while (<INPUT>) { ... print $result; # I've tried all sorts of things here with | < > at the beginning or the end, # exec and backticks...