#!/usr/bin/perl –w use strict; use Net::Telnet; my $tnet = new Net::Telnet; $tnet = new Net::Telnet; $tnet->open("deneb"); $tnet->login($username, $passwd); my @lines = $tnet->cmd("tail /var/log/syslog"); print @lines;