In the latter case, Perl calls the shell to handle the redirection, but command.com and cmd.exe have a built-in date command. Specify the full path to your Cygwin date binary. Alternatively, you probably should use something like print scalar localtime.
Note: if you forget to log in before posting, please reply to your own thread rather than posting a dupe that someone then has to clean up after you. Bonus hint: you may want to go to your User settings and change the site theme to a different look - that way, it is immediately obvious whether you are logged in.
Makeshifts last the longest.
| [reply] [d/l] |
Strange, your question does not have any relations to perl.
When I tried your situation on my computer, I got predicted behaviour, namely date commands with any redirections worked good.
I think our difference may be influented by cygwin versions, and remember there is a DOS-builtin date command which asks for a date to change, so you probably somehow got out of your cygwin environment and got into bultin (win?)DOS commands.
Best wishes,
I.R.Baboon. | [reply] |
| [reply] |