[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Telnet app?



At 1:56 PM -0600 12/9/97, Wade Williams wrote:

} Anyone ever created a Telnet app with MacPerl (or Perl)?

Net::Telnet, in any CPAN archive.  I haven't looked at it in a while, but I
noticed no MacPerl show stoppers in previous versions.  The current is 3.0.
A quick glance at the code with Shuck shows nothing obvious that will go
wrong under MacPerl.

}
} That is, I want an app that will log into a host, run some commands, save
} the output to a file, and then let perl do some operations on the data.

This example is in the Net::Telnet pod:

    $sparky = new Net::Telnet (Host => "sparky",
                               Timeout => 10,
                               Prompt => '/[$%#>] $/');
    $sparky->login($username, $passwd);
    @lines = $sparky->cmd("/usr/bin/who");
    print @lines;
    $sparky->close;

So I suppose you can do what you want.  I'm not going to try it because I
don't shove my real password over the net unless absolutely necessary.

}
} Is Comm.pl the only way to accomplish this?  Seeing as how comm.pl looks to
} be fairly Unix-specific, I'd probably have to run my script on a Unix box.
}
} Or should I just use an expect script to do the Telnet data capture, and
} let Perl operate on the captured files?
}
} Any thoughts, observations or experiences greatly appreciated.
}
} Wade
} ---------------------------------------------------------------------------
} Wade Williams                      "And the trees are all kept equal by
} Systems Engineer                    hatchet, axe, and saw."
} Cisco Systems, Inc.                       - N. Peart
} Brentwood, TN
} 615-221-2918
} wwilliam@cisco.com
} ---------------------------------------------------------------------------
}
} ***** Want to unsubscribe from this list?
} ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch


---
Paul J. Schinder
NASA Goddard Space Flight Center
Code 693, Greenbelt, MD 20771
schinder@pjstoaster.pg.md.us



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch