in reply to Printing rtf-files with openoffice windows xp

system launches a program. If the first argument is 1, the program is launched in the background (Windows only). Passing the parameters as seperate strings (as opposed to passing a single string to system) prevents injection attacks/bugs.
my $filename = 'test.rtf'; system(1, 'c:\\program files\\openoffice\\soffice\\swriter.exe', '-p', + $filename);

Replies are listed 'Best First'.
Re^2: Printing rtf-files with openoffice windows xp
by cwry (Monk) on Aug 01, 2006 at 05:07 UTC

    Just a small side note, 'c:\\program files\\openoffice\\soffice\\swriter.exe' might be more nicely written as 'c:/program files/openoffice/soffice/swriter.exe'.