in reply to avoiding newlines when using system calls.

Try   chomp($today = `date +%D`); or better, figure out how to to extract what you need from localtime(), and avoid the overhead of invoking another process.