I have a directory in which there are a number of files with the timestamp tagged along with the name.
For example:
AAAA*20111031*.log
AAAA*sfdaf*20111031*.log etc
I need to automate copying of these files to a different directory. Since the date changes daily I tried using a global variable $date = `date +%Y%m%d`. I am not able to use a statement like
if ($file =~ AAAA\*\$date) {copy program}
where $file globs through the directory
Any suggestions ???