in reply to Re^2: simple IPC needed
in thread simple IPC needed

Here are two progs that works under linux, I have no way to test under windows. You should read "perldoc perlsec" for info about security and tainted data. You untaint data with regexps, remember to be careful.
#!/usr/bin/perl -w use strict; use Tk; my $mw = MainWindow->new(); my $file_name = 'Some file'; $mw->send('Foo' => $file_name); #!/usr/bin/perl -Tw use strict; use Tk; my $main_window = MainWindow->new(-title => 'My other prog'); $main_window->appname('Foo'); MainLoop; sub Tk::Receive{ shift; my $string = shift; if (my ($file) = $string =~ /^([^-]+)$/){ print "Got: $file\n"; exit 0; } else { print "Wrong arg Received\n"; exit 1; } }