Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!iWarp.intel.com!news From: merlyn@iWarp.intel.com (Randal L. Schwartz) Newsgroups: comp.lang.perl Subject: Re: What am I missing from chat2.pl? Message-ID: <1991May27.160539.8127@iWarp.intel.com> Date: 27 May 91 16:05:39 GMT References: <1991May27.120442.16645@colorado.edu> Sender: news@iWarp.intel.com Reply-To: merlyn@iWarp.intel.com (Randal L. Schwartz) Followup-To: poster Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 47 In-Reply-To: frechett@spot.Colorado.EDU (-=Runaway Daemon=-) Nntp-Posting-Host: se.iwarp.intel.com In article <1991May27.120442.16645@colorado.edu>, frechett@spot (-=Runaway Daemon=-) writes: | I have the begginnings of of a script here.. It is based directly off | of a perl script that is supposed to go off and get the weather so I | know the syntax is correct.. or should be if the weather sript actually works.. | (it can't connect to the machine and times out there) but working with it | as an example I started this. Gosh. Bug reports against chat2.pl already! :-) | #!/usr/bin/perl | | push(@INC,'/users/en-ecen/frechett/perl'); | require './chat2.pl'; | | &chat'open_port('spot.colorado.edu', 4242) || die "open: $!"; | | &talk("$1\n"); | $_ = &listen(1); | &talk("nick Dae\n"); | | And what does it do.... | Undefined subroutine "main'talk" called at /users/en-ecen/frechett/perl/chat line 8. &talk() was defined near the end of the weather script. For that program, I wrote up a &talk() and &listen() that sat on top of &chat'print() and &chat'expect() so I could watch the dialog in debug mode. You can either steal the &talk() and &listen() from the weather script, or just call &chat'print() and &chat'expect() yourself. Eventually (like in the *beta* of chat2 :-), I'll roll a canonical talk and listen into the chat2 package, because I notice myself using them frequently in my test programs. Remember... chat2 is still alpha. If it's missing something, yell at me. If you don't understand something about it, yell at me. If you like it, just say kind words. :-) (I'm working on "select" right now, by the way. Ugh. :-) qx(echo Just another Perl hacker, >/dev/tty) -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Intel: putting the 'backward' in 'backward compatible'..."====/