Play movie from SSH command?

I’d like to play a movie (or a playlist) on my AppleTV through an SSH command. 

Any idea how it can be done?

I wrote my own perl script to load the playlist. As far as I know, I don’t know any built-in script to do this.

Could you share your perl script? 

thanks!