Thanks for your help.
I used the first script you mentioned for prompting the user. Running the script showed when the file was last modified in seconds. I tried changing to show when the script was created but failed when changing the line $file_stat->mtime to $file_stat->ctime.
It also got me wondering whether it would be better to produce a script which showed when created and last modified?