Telnet from windows to an arm32 processor

Discussion in 'Perl Misc' started by nbufkin, Apr 19, 2005.

  1. nbufkin

    nbufkin Guest

    I am trying to connect via telnet from a windows 2000 machine to a
    arm32 processor using perl. The example scripts provided by this group
    are similiar to the following:

    use Net::Telnet ();
    $t = new Net::Telnet (Timeout => 10,
    Prompt => '/bash\$ $/');
    $t->open("sparky");
    $t->login($username, $passwd);
    @lines = $t->cmd("who");
    print @lines;

    The device I am connecting to does not require a username and password,
    so I have modified the script to look like this:

    use Net::Telnet ();
    $t = new Net::Telnet (Timeout => 10,
    Prompt => '->');
    $t->open("10.1.4.2");
    @lines = $t->cmd("i");
    print @lines;

    The script return with the following error message:

    "bad match operator: opening delimiter missing: -> at try3 line 2"

    The script always fails at the prompt line. Does the Net::Telnet
    object require a username and password?
    nbufkin, Apr 19, 2005
    #1
    1. Advertising

  2. nbufkin

    HC Guest

    "nbufkin" <> wrote in message
    news:...
    >I am trying to connect via telnet from a windows 2000 machine to a
    > arm32 processor using perl. The example scripts provided by this group
    > are similiar to the following:
    >
    > use Net::Telnet ();
    > $t = new Net::Telnet (Timeout => 10,
    > Prompt => '/bash\$ $/');
    > $t->open("sparky");
    > $t->login($username, $passwd);
    > @lines = $t->cmd("who");
    > print @lines;
    >
    > The device I am connecting to does not require a username and password,
    > so I have modified the script to look like this:
    >
    > use Net::Telnet ();
    > $t = new Net::Telnet (Timeout => 10,
    > Prompt => '->');
    > $t->open("10.1.4.2");
    > @lines = $t->cmd("i");
    > print @lines;
    >
    > The script return with the following error message:
    >
    > "bad match operator: opening delimiter missing: -> at try3 line 2"
    >
    > The script always fails at the prompt line. Does the Net::Telnet
    > object require a username and password?
    >


    compare:

    Prompt => '/bash\$ $/';

    and...

    Prompt => '->';

    the first one looks like: '/something/'
    and yours looks like 'something'
    HC, Apr 20, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. FalkoG
    Replies:
    0
    Views:
    961
    FalkoG
    Dec 22, 2006
  2. Jim Isaacson
    Replies:
    5
    Views:
    603
    Default User
    Nov 5, 2004
  3. brahatha
    Replies:
    1
    Views:
    657
  4. Daniel Pitts
    Replies:
    3
    Views:
    6,585
    Kevin McMurtrie
    Feb 27, 2008
  5. Carcarius
    Replies:
    0
    Views:
    291
    Carcarius
    Dec 6, 2007
Loading...

Share This Page