blackadder has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I have this very simple code?
#! c:/perl/bin/perl.exe -slw use strict; use Net::Telnet(); use Net::Telnet::Cisco; my $session = Net::Telnet::Cisco->new(Host => 'ccc1000'); $session->login('BA', 'BA123BA');
Which gives me this very annoying error
Use of /g modifier is meaningless in split at C:/Perl/site/lib/Net/Tel +net/Cisco. pm line 756. pattern match timed-out at C:\Perl\Vodafone\test2.pl line 7
but if I try the same thing manually.i.e. through a Telnet session, it works fine!

Anyone can enlighten me on why this is not working?

Thanks
Blackadder

Replies are listed 'Best First'.
Re: Telnetting to a cisco box
by gargle (Chaplain) on Sep 14, 2005 at 07:56 UTC

    Hi,

    Which version of active state perl are you using on your windows machine? I've found release info that talks about your warning. (Do a search for split on the page and you'll find the message.

    --
    if ( 1 ) { $postman->ring() for (1..2); }
      I am using this version

      This is perl, v5.8.7 built for MSWin32-x86-multi-thread
      Blackadder
Re: Telnetting to a cisco box
by eXile (Priest) on Sep 14, 2005 at 13:56 UTC
    If a manual Telnet works just fine, using Expect might be something you want to look into. There's a tutorial on that in the tutorials section here.