Sara has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: different date command executed when called with redirection
by Aristotle (Chancellor) on Jul 03, 2002 at 20:12 UTC

    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.

Re: date command !!!!
by Baboon (Acolyte) on Jul 03, 2002 at 20:26 UTC
    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.

Re: date command !!!!
by rbc (Curate) on Jul 03, 2002 at 21:58 UTC