hmm, well, that helped me less than i thought it would. i know how to do this in *nix - basically you can just open up a pipe/filehandle to the actual printer (located somewhere in the /dev hirearchy), and 'print' to that filehandle.
however, looking at your code, i notice you're not working in *nix, you're working in dos/windows. i would suggest looking through the documentation for the various perl modules for windows (Win32 and Win32API) that are likely already on your system (assuming you're using a windows distribution of perl(activestate)). one of them is bound to have the information you need.
sorry i can't be of any more help... "If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito."