in reply to How to look for application path

What you need is the ShellExecute function from the Win32 API. ShellExecute reads a file's extension and starts the associated application that handles that file type, just as if someone had double clicked on the file in explorer.

#!/usr/bin/perl use strict; use warnings; use Win32::API; my $ShellExecute = new Win32::API("shell32", "ShellExecute", [qw(N P P + P P N)], 'N'); my $hWnd = 0; my $filename = 'c:/public/test.pdf'; $ShellExecute->Call($hWnd, 'open', $filename, '', '', 1);

I didn't munge it into your example, but it should be pretty straightforward to do.