Nelson Wong wrote:
> 
> Hi all,

Hello,

> I have been doing redirect the output of command (an external tool, exe)
> to a file, by doing following:
> 
> system( "tool.exe args args args > tempoutput");
> 
> and I read tempoutput to a list, by doing following:
> 
> my $FIN = new FileHandle;
> open ($FIN,$map_file);

You should _ALWAYS_ verify that the file opened correctly.

> my @lines = <FIN>;
> 
> So that I can parse it for another purpose.
> 
> Now, I wonder if there is any way I can redirect the output of tool.exe
> to a list directly?

Yes there is:

my @lines = qx(tool.exe args args args);



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to