Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Calling Windows "time /t" command

by liverpole (Monsignor)
on Jul 27, 2006 at 14:42 UTC ( [id://564116]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    my $time = time;
    my $timestr = localtime($time);
    print "Current date/time is $timestr\n";
    
  2. or download this
    my $x = `time /t`;  # Assign $x to the system time (only in Windows)
    chomp $x;           # $x now holds something like "10:51 AM"
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-19 03:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found