On Fri, Jan 2, 2009 at 21:40, Chas. Owens <chas.ow...@gmail.com> wrote:
snip
> I thought Win32 could do something similar with the start command, but
> it doesn't seem to work, so you will have to know the right program an
> say something like this:
>
> my %prog = (
>    xls => "excel",
>    doc => "word",
>    etc => "etc"
> );
>
> system $prog{$file_type}, $file;
snip

Well, it looks like you can just say

system $file;

on Win32 platforms and if the file has an associate program it will
open in it; if the file has no associated program a window will launch
asking what program you wish to open it with.


-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to