#!/usr/bin/perl -w

use strict;
use warnings;
use Expect;

my $command = 'telnet localhost 4444';
my @parameters = ();

my $exp = new Expect;
$exp->raw_pty(1);
$exp->spawn($command, @parameters)
  or die "Cannot spawn $command: $!\n";

# send some string there:
$exp->send("\n");
$exp->expect(5, ['brana login:']);
$exp->send("pforty\n");
$exp->expect(5, ['Password:']);
$exp->send("inttest/\n");
$exp->send("who/\n");

$exp->soft_close();

