in reply to find CD drive letter
use Win32::FileOp qw(Substed); sub findCD { for ('A'..'Z') { return $_.':' if (Substed($_))[1] =~ /^CdRom/ }; return }; print findCD();
This finds the first CD drive on your PC. Whether that's of any use, I'm not sure. The program may be installed from a different place. And if the installation is already running, you can find out the path to the executable. See for example FindBin.
For the second question ... if by "result" you mean the stuff the program prints then you are looking for "backticks": $output = `the_program and parameters`;. See "Quote-Like Operators" in perlop.
Jenda
Enoch was right!
Enjoy the last years of Rome.
|
|---|