#!/usr/bin/perl use warnings; use strict; use Tk; #read README.remote in mpg123 sources $|++; #my $pid = open(FH,"| mpg123 -R 2>&1 "); my $pid = open(FH,"| mpg123 -R >/dev/null 2>&1 "); print "$pid\n"; my $mw = new MainWindow; my $startbut = $mw->Button(-text =>'Start Play', -command => sub{ syswrite(FH, "LOAD 1bb.mp3\n") ; })->pack; my $pausebut = $mw->Button(-text =>'Pause', -command => sub{ syswrite(FH, "PAUSE\n") ; })->pack; my $exitbut = $mw->Button(-text =>'Exit', -command => sub{ exit })->pack; MainLoop;