<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">(I've not been closely following this thread)<br>
<br>
So if $found_end is true, then /$prompt\s?(quit|exit|Connection( to \S+)?<br>
closed)/ must not be, for $clean_run not to be true.<br>
<br>
What does the end of "show config" look like?<br></blockquote><br>The end will look something like this:<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">
<div style="margin-left: 80px;">!<br>end<br><br><br>switch(su)-> <br></div></blockquote><div><br>but! The "end" is sometimes not there. Not sure why.<br><br>Also, I set $clean_run at the top of the script and had the variable printed in various parts to see if it got changed at all. I changed it to 2 so I could see if it got changed to 0 or 1. It didnt. It ended with a value of 2.<br>
</div>