in reply to IPC, trying for have child wait for commands

Just an update, I figured out what I wanted last night. Here is the code:

#!/usr/local/bin/perl use POSIX; use Tk; use LWP::UserAgent; use URI::URL; pipe(FROM_P, TO_C) or die "pipe: $!"; select(((select(TO_C), $| = 1))[0]); my $ua = LWP::UserAgent->new; if (!($pid = fork)) { close(TO_C); while($line = <FROM_P>) { print "Child Pid $$ just read this: $line\n"; chomp($line); $url = $line; $file = 'yahoo.txt'; my $req = HTTP::Request->new(GET => $url); $req->header('Accept' => 'text/html'); $ua->proxy('http' => 'http://www.proxy.com:1080); $req->proxy_authorization_basic("me", "xxxx"); $res = $ua->request($req, $file); }; } my $mw = MainWindow->new(); $button = $mw->Button(-text => "click here to download yahoo web page" +, -activebackground => 'red', -command => \&printit)->pack(); print "i'm the parent about to mainloop\n"; MainLoop; sub printit { print TO_C "http:\/\/www\.yahoo\.com\n"; }