Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: subprocess delay on Windows with Perl/Tk

by pfaut (Priest)
on Jun 03, 2004 at 19:15 UTC ( #360376=note: print w/replies, xml ) Need Help??


in reply to Re^2: subprocess delay on Windows with Perl/Tk
in thread subprocess delay on Windows with Perl/Tk

Win32::Process works, but I'd have to know the full path to excel.exe.

That's not hard to find.

use File::Spec; sub find_in_path { my $prog = shift; my $fmm; for my $d (File::Spec->path()) { $fnm = File::Spec->catfile($d,$prog); last if -x fnm; $fnm = undef; } return $fnm; } my $excel = find_in_path('excel.exe');
90% of every Perl application is already written.
dragonchild

Replies are listed 'Best First'.
Re^4: subprocess delay on Windows with Perl/Tk
by kgoess (Beadle) on Jun 03, 2004 at 20:05 UTC
    Thanks, but that's assuming excel.exe is in your path. It's typically not, rather it's typically in some place like c:\Program Files\Microsoft Office\Office10\. That's the case with most Windows packages that you'd install.

      I'm confused. You complain you can't use one method because it requires a full path. Then you say it may not be in your path. How do you invoke it then? Either you need to know where it is and provide the full path or it needs to be in your path. Am I missing something?

      90% of every Perl application is already written.
      dragonchild

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://360376]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2020-10-30 14:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (280 votes). Check out past polls.

    Notices?