On Thu, 07 Oct 2004 16:10:29 +0200, Jenda Krynicky <[EMAIL PROTECTED]> wrote:
> From: "Bee" <[EMAIL PROTECTED]>
> > I am curious to know that if that is an existed module to open files
> > with it's default application just like I double click on the file
> > with mouse. and I do something just like this with my code :
> >
> > use defaultOpen;
> > defOpen 'C:\temp.gif' or die "$!" ; # Then the image will open with
> > photoshop. defOpen 'C:\temp.doc' or die "$!" ; # then the document
> > will open with Word.
> >
> > I've made this done by writting a batch like code.. but I sure that's
> > unsafe and unportable.
> >
> > Thanks for any hint,
> > Bee
>
> The system('start file.doc') only allows you to trigger the default
> action defined for the file type. If you want to use the other
> actions you might like
> use Win32::FileOp qw(ShellExecute);
> ShellExecute 'Print' => 'c:\temp.doc';
Wow. Best answer. I assign you 50 guru points :-)
Where do I send them?
>
> Jenda
> ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
> When it comes to wine, women and song, wizards are allowed
> to get drunk and croon as much as they like.
> -- Terry Pratchett in Sourcery
>
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>