Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

RE: RE: Atomic Time and Date

by providencia (Pilgrim)
on Jun 05, 2000 at 19:48 UTC ( [id://16427]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://16427]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-26 01:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found