To convert data using asc2pov, simply feed the script with AAIGrid data on STDIN, and redirect the output to the designated file (which will, obviously, be overwritten) using the following syntax:
$ cat demodata.asc | perl asc2pov.pl > demodata.tga
(Please note that demo data is not included in the script distribution)