Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: Perl's Telnet vs. Expect Module

by gnork (Scribe)
on Dec 03, 2003 at 11:55 UTC ( #311878=note: print w/ replies, xml ) Need Help??


in reply to Re: Perl's Telnet vs. Expect Module
in thread Perl's Telnet vs. Expect Module

I would take a closer look at Expect.pm. I use it frequently and it saves you a lot of time not fiddling around with Net::Telnet. Additionally, Expect.pm has a lot more functionality you will find very usefull.

cat /dev/world | perl -e "(/(^.*? \?) 42\!/) && (print $1))"
errors->(c)


Comment on Re: Re: Perl's Telnet vs. Expect Module
Replies are listed 'Best First'.
Re: Re: Re: Perl's Telnet vs. Expect Module
by TASdvlper (Monk) on Dec 03, 2003 at 15:59 UTC
    It sounds like Expect is the way to go. Below is what I want to do, does Expect still make sense ? I was to "push" a set of scripts to a remote system, execute them, collect logs and move then back to my server, then clean up the remote server. So, script executed remotely is not interactive, but I need to do other actions pre/post executing the script. btw - what is /dev/world ? I don't see it on my Linux/Unix boxes.
      If you cant see /dev/world, have a look at the Character Devices Section of the linux kernel configuration.

      Check (X) Emulate World
      (You will need to display experimental drivers for that)

      If it is checked, do a 'insmod world' at the commandline. ;o)

      cat /dev/world | perl -e "(/(^.*?\?) 42\!/) && (print $1))"
      errors->(c)
        I'll have to try that at home, I don't have access to rebuild Linux kernels at work but I have a Linux system at home (older RedHat version, 5.x I think). Thanks.
Re: Re: Re: Perl's Telnet vs. Expect Module
by TASdvlper (Monk) on Dec 04, 2003 at 00:24 UTC
    Can you elaborate on some of the functionality that you find useful ??? I still trying to get a grasp on what's better, Telnet or Expect.
      Try here. It's the POD from CPAN's page for Expect.pm. It'll tell you everything you need to know.

      -Logan
      "What do I want? I'm an American. I want more."

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://311878]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (15)
As of 2015-07-28 13:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (255 votes), past polls