#!/usr/bin/perl use warnings; use strict; use Tk; # read README.remote in mpg123 sources # only works after mainwindow is closed ???? $|++; my $pid = open(FH,"| mpg123 -@ - "); print "$pid\n"; my $mw = new MainWindow; my $startbut = $mw->Button(-text =>'Start Play', -command => sub{ syswrite(FH, "1bb.mp3\n") ; })->pack; MainLoop;