Google Groups Home
Help | Sign in
Message from discussion Filehandles
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
valerie.seign...@gmail.com  
View profile
 More options May 10, 9:36 am
Newsgroups: comp.lang.perl.misc
From: valerie.seign...@gmail.com
Date: Sat, 10 May 2008 06:36:10 -0700 (PDT)
Local: Sat, May 10 2008 9:36 am
Subject: Filehandles
Hi,

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...

}

I'd be greatful for any leads on this!
Val

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google