I am developing web interface for an mp3 player (mpg123 linux). The mpg123 is a command-line mp3 player and can be controlled using keyboard inputs. For example:
$ mpg123 -C filename.mp3
it will start playing the song and monitor keyboard inputs for control. Pressing 's' will pause the song 'q' for quit etc.
I am spawning an mpg123 process using a Perl script. From that script I want to send inputs to this process. I have the pid of the process, I just need to send keystrokes to this process for control purpose.