in reply to RE: Atomic Time and Date
in thread Atomic Time and Date

I keep getting:
C:\WINDOWS\COMMAND.COM /c perl time-date-other.pl
Couldn't set time: No such file or directory at time-date-other.pl line 14.
Hit any key to close this window...

I changed the last two lines to:
system("time $new_time"); system("date $new_date");

and it works. It seems to be the:
or die "Couldn't set time: $!"; or die "Couldn't set date: $!";

It doesn't work with those.
I don't have a clue as to why. ??!!??
I like it though.

Replies are listed 'Best First'.
RE: RE: RE: Atomic Time and Date
by mdillon (Priest) on Jun 05, 2000 at 19:52 UTC
    no, i think it's the change from system(CMD, ARGS) back to system(EXPR) that fixed it. die doesn't do anything with a file or directory in that code, so i can't see it being the problem. maybe ActivePerl only likes the monadic (one argument) form of system.

    update: i may have figured it out. i think to do it my way, you would have to say 'TIME.EXE' or whatever the full name of the executable is because it isn't passed to COMMAND.COM to be resolved.