in reply to Executing a Dos command

Although you'd like to run a DOS command, I'd be willing to bet you're running a windows machine. I've had trouble running exec on ActiveState Perl before, so I usually use system instead. For instance, if I wanted to open an XML file that I just finished writing so that I can view the results, I've written in the past:

# open file for output open my $file, ">${title}.xml" or die "Couldn't open file: $title.xml +\n\n"; select $file; ## Print lots of XML data here # open GGobi for viewing close $file; system "ggobi.exe ${title}.xml";

In addition, if I use system, my Perl scripts waits around until the new process is terminated.