Looks like you're missing a couple of things here.
- You open a file for writing (">List_of_files_changed.txt") and then never use the associated file handle. Perhaps you intended to redirect one of your print statements using print FILES ..., but didn't.
- Within a for loop, if you specify a variable to be filled (as you do by specifying for my $file), $_ doesn't get filled in. Either use $file or $_, not both.
Hope this helps.