I wrote a small perl script in unix that searches in a file and saves some information in a separate file. Since this is a log file, I would like to have the date added to file name. I have no idea where to start.
output:
log_010907.txt
from that, you can assign your date variable. there's no need to call external date command from the shell. for more information, read the rest of perldoc -f localtime.
put all your open() and close() commands outside the for loop. Use a different file handler, don't name both of them FILE !..