Small example that works for me:

@machine=(machine1, machine2,machine3); # Assuming you want to telnet to more than one 
machine
$uname="username";
$pwd="password";
$dir1="somedir";

foreach (@machine) {
        $MN=$_;
        $t=Net::Telnet->new(Host => $MN,
        Prompt => '/[\$%#>] $/',
        Timeout=>15);
        $t->login($uname,$pwd);
        $t->cmd("cd $dir1");
        @files=$t->cmd("dir /b"); # Get a list of files in $dir1 put into array
        foreach (@files) {
                # do something with each file
        }
        @text=$t->cmd("type filename"); # Get contents of file and stick in array
        foreach (@text) {
                # Do something with each line
        }
}

Richard

-----Original Message-----
Hi,

Has anyone had this working, connecting to a Microsoft Telnet server ?
I posted earlier and still have the same problem, that the cmd is returning
no output, even though the output appears in the dump log.

Cheers,

Nick Djurovich
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to