in reply to simple question
This is because date prints a newline, and the backquotes catch it, so the newlines are in the string $yr and $mm.
Date has to print a newline, as otherwise the output would get into the same line as your prompt if you call it from the shell (this is like this only on unix systems, dos prints a newline before the prompt).
To correct it, remove the newlines from the strings with the command
chomp ($yr, $mm, $dd);
Update: Five identical answers to the question, wow!
|
|---|