in reply to How to use "$ssh->before()"

If the data shown is the product of your complete script (and since you didn't post your complete script, we can't tell) then your question needs clarification.

Please read the documentation for whatever vers. of SSH 1 you're using... and perhaps read about ping as well, because "0.00% packet loss" means the server on the ip you pinged IS alive -- you got responses. Ditto the match between the numbers of packets transmitted and received.

Update: 1 Kudos to Prior vinoth.ree appears to have identified the most likely SSH module supporting $prematch.... ++.



If you didn't read the docs, shame!

Replies are listed 'Best First'.
Re^2: How to use "$ssh->before()"
by vinoth.ree (Monsignor) on Apr 15, 2015 at 10:53 UTC

    He is using Net::SSH::Expect, Of course it took time for me to find which module gives these methods.


    All is well. I learn by answering your questions...
Re^2: How to use "$ssh->before()"
by hxbsy (Novice) on Apr 15, 2015 at 12:53 UTC

    Thx
    The data shown on the H3C switch.actually I want to check the peer IP of swith port is alive or not,so i can be notified that the connected line is up or down.
    I prefer Net::SSH module.but i don't know how to use "$ssh->before()",when the perl script logins to the switch.