in reply to read from a file and write into the same file

From the docs:
If MODE is '>>', the file is opened for appending, again being created if necessary.
Adding a '+' doesn't change the position of the file-pointer, so you are already at the end of the file.

Your while(<FILE>) gets a boolean FALSE and you never enter the loop at all. Remember, the loop-test is done first! If you want to go through the loop at least once, you put the test at the end:

do { print $_; print FILE "*****************"; } while (<FILE>)
Of course the first (and only) time through this loop the value of $_ has no relationship with the file being read and it may even contain a value from earlier in your program!

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James