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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: login juniper ERX
by Corion (Patriarch) on Jun 09, 2008 at 10:03 UTC

    I guess that one of the problems with your code is with the following parameter:

    Prompt => '/[ERX02#]/'

    This most likely does not do what you want. It will match any string containing a "E", "R", "X", "0", "2" or "#". See perlre. Most likely you want this instead:

    Prompt => '/\\[ERX02#\\]/'

    Why did you comment out use strict; in your code? Using strict helps you to find errors in your variable declarations.

    I find it quite rude of you to post a new top-level question without any hint to your previous question and the answer you got there already. Also, you could have formatted your session output in code tags so it reads nicer and doesn't get the square brackets interpolated.

      Quick tip:

      If you don't want to worry about escaping stuff twice, you can use

      Prompt => map("/$_/", qr/...any regexp.../)

      as in

      Prompt => map("/$_/", qr/\[ERX02#\]/)

      You can even safely use modifiers like i and x on the qr//.

          A reply falls below the community's threshold of quality. You may see it by logging in.