I don't understand why you are using perl at all... what is it you are doing that Apache can't do? Taking a static file, and feeding it to a network socket is exactly what httpd does all day and night, and presumably is optimised pretty well to do... this isn't meant to sound negative - I'm really curious what you are gaining. I can certainly stream music that way, and mplayer has worked with divx too, although I do that less often.