Perl::expect script error

From: ruud (geen_at_mail.invalid)
Date: 01/19/05


Date: Wed, 19 Jan 2005 07:40:51 +0100

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 ?

-- 
Gr. Ruud


Relevant Pages

  • Re: Cant capture PID with script in cron
    ... Glad to see you have quit top posting and started responding after the ... That will make the script a little more portable to other systems ... o cron/at batch jobs are not hooked to a tty. ... # The applescript performs a function in the Mac OS scripting language ...
    (comp.unix.questions)
  • Re: going to try zyban again
    ... Let us know if you got the script, ... I quit on zyban when i was 21 when in college. ... i've only been smoking for less then a month. ...
    (alt.support.stop-smoking)
  • Re: keeping mail identities on Flash Drive
    ... I started a separate thread to deal with the issue ... a site wiht a ready to go script to use. ... you quit out of all of the other Office applications, ... Mickey Stevens ...
    (microsoft.public.mac.office.entourage)
  • Re: Script for daily quit not working ... thoughts?
    ... Barry Wainwright wrote: ... > script, not an application. ... Script for daily quit not working ... ... >> Entourage, but it started NOT working a few versions ago. ...
    (microsoft.public.mac.office.entourage)
  • Re: Using script to spell check
    ... The Quit statement can accept additional parameters. ... Dim objWord, Word, WshShell, BtnCode, strSuggestion, lstSuggestions ... Did find info on how to write windows script, ...
    (microsoft.public.windowsxp.general)