I have been playing recently with perls Expect module, and came across a variety of instances where I needed to wait for the command prompt to appear before I moved on with the program. So how does one find the 'current prompt' for use later in the program to wait for said prompts to appear before continuing?
The problem I have is that the command prompt is different for root, regular users, etc. I have tried sending just a newline down on the Expect handle, but it returns nothing. before/match/after are all always empty etc.