On Fri, 31 Aug 2001, Edouard Beaugard wrote:

>      @info = system `nbtstat -a machinename`;
>
> -or-
>
> 2.
>
>      @info = system 'nbtstat -a machinename';
>
> -or-
>
> 3.
>
>       @info = system('dir c:\\perl')
>
> None of these work. With 1 I get the error
>
>      "A domain controler for Connection: could not be found."
>
> With 2, I get the output but it goes to STDOUT and not the array.
>
>  3 is the same as 2, the output goes to STDOUT and not the array.

You dont want to use system, use the backtick operator (either `` or
qx()):

my @info = qx(nbstat -a machinename);

See the perlop manpage for more information of the backtick operator.

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
So you're back... about time...


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

Reply via email to