R
ruud
I'm writing a script that can post to my newsserver.
#!/usr/bin/perl
use Expect;
use warnings;
use strict;
my $post = "post";
my $hallo = "200";
my $quit = "quit";
my $conn;
$conn -> spawn ("news.nntpserver.com:119");
$conn -> expect ("$hallo");
print "$post\n";
But i get this error:
Can't call method "spawn" on an undefined value at ./p line 11.
What is wrong with this expect script ?
#!/usr/bin/perl
use Expect;
use warnings;
use strict;
my $post = "post";
my $hallo = "200";
my $quit = "quit";
my $conn;
$conn -> spawn ("news.nntpserver.com:119");
$conn -> expect ("$hallo");
print "$post\n";
But i get this error:
Can't call method "spawn" on an undefined value at ./p line 11.
What is wrong with this expect script ?