I need to print a generated text-file with perl. I'm using xampp, Windows7 64 bit. My perl-script is containing the print system call:
$system = "print\ /d:\\\\SERVER\\PRINTER\ C:\\xampp\\cgi-bin\\textfile.txt";
system ($system);
When i try the same line in the cmd-shell, the print works.
The answer is:
C:\xampp\cgi-bin\textfile.txt wird momentan gedruckt.
but nothing else happens.
I then tried to create a batch-file. Starting the batch-file manually starts the print. From a system()-call nothing happens.
Then i tried another way, showing the file in Firefox first. I copied the file to my htdocs-dir and changed my batch-file to:
cd "c:\Program Files (x86)\Mozilla Firefox"
firefox.exe -new-window http://localhost/textfile.txt
Doubleclicking the bat starts my firefox and my textfile. The system()-call ist not working.
Any Ideas?
Tom