but the final outcome prints it only once
Not sure if I understand your question correctly, but the logic of your program looks weird: Your program starts by reading some lines from your log (this is the outermost while. This goes on until it reads the first INFO line in the log. After this, the second while-statement starts reading lines from the log, until a line continuing AA_BIN_MSG_VER_CHG is found. Finally, the third while-statement reads all the remaining lines in the log. The last of those lines which happen to contain a User Id, set the variable $User_Id. The subsequent while loops are ignored, because you are already at EOF. Then comes one print statement. Then comes a next statement (which is superfuous anyway, because it is at the end of the loop). The enclosing while loop won't be entered again, since, as we saw, you are already at EOF. Hence all you see is just one diagnostic line printed.
BTW, where is your use strict; use warnings;?
In reply to Re: Comma seperated output
by rovf
in thread Comma seperated output
by namishtiwari
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |