I wrote a script that interfaces with some gear and at one point in the script I have to reboot the card. Now I want to create another telnet session that will re-establish the connection once the card comes back up. I want to use a way that tries to connect and if the connection does not get established then I want it to loop back and try again until the connection is back up which would mean the card has finished rebooting.
I tried adding a while loop in this manner but was unsuccessfull. Anyone have any ideas on how to implement this?
Oh I forgot to mention that I am using Net::Telnet module for the telnet sessions.