#!/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; } }
In reply to Re^3: simple IPC needed
by lidden
in thread simple IPC needed
by redss
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |