You could do this
$returned = `spam -momittag -c $tooldir/nsgmls.cat $dtddir/$.dtd $file`;
$returned will now contain whatever your program would have printed to the
console.
You can work with the data in a perl script, or just save it out using perl
open OUT, ">$newfile" or die "Can't create $newfile: $!";
print OUT $returned;
close OUT;
Then again, maybe it's just a case of escaping the >, like so.
system("spam -momittag -c $tooldir/nsgmls.cat $dtddir/$.dtd $file
\>$newfile");
(not really an answer, just pointers...)
John
-----Original Message-----
From: Keith Haynes [mailto:[EMAIL PROTECTED]]
Sent: 29 June 2001 16:43
To: [EMAIL PROTECTED]
Subject: Invalid switch message
Hi all,
I am relatively new to Perl and my background is not programming although I
quite enjoy manipulating text using Perl, with this in
mind I would appreciate any replies being kept relatively simple, if that's
possible.
My problem, I am running an exe file within perl and receiving the message
'invalid switch' when I use the redirect symbol (>) to
output to a file, the script still performs the required operation but it
would be nice to remove this message. There follows an
example of the code I am using:
system("spam -momittag -c $tooldir/nsgmls.cat $dtddir/$.dtd $file
>$newfile");
Thanking you in advance,
Keith
--------------------------Confidentiality--------------------------.
This E-mail is confidential. It should not be read, copied, disclosed or
used by any person other than the intended recipient. Unauthorised use,
disclosure or copying by whatever medium is strictly prohibited and may be
unlawful. If you have received this E-mail in error please contact the
sender immediately and delete the E-mail from your system.