pbhandari 0 Newbie Poster

Hi,

I have following line in my Perl code-->

system("start my.exe myfile.ext") == 0 or die "error ($?) : $!";

Q1: How do I close my.exe?
Q2: If I give myfile.ex1 instead of myfile.ext, myfile fails to open.
However, the error code returned by Perl is still 0.
Normally (when I specify myfile.ext), if I check what is stored
in $!, its always "No such file or directory".
I want to report the error while opening 'myfile'. How can it be
done?

Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.