Execute date command and get user input : date time « Data Type « Perl






Execute date command and get user input

  

#!/usr/bin/perl -w

use strict;

print "using a string literal:\n";
print `date`;
print "backquotes error status: $?\n";

   
    
  








Related examples in the same category

1.To extract the current date by using time and localtime
2.Set the value of localtime to a scalar variable, you'll get a typical UNIX-style time
3.scalar(localtime(time()))
4.Splitting Time
5.Create new time based on the value from localtime
6.Print out the current time in standard time
7.Is leap year subroutine
8.Time of Day
9.Switch Time
10.Converting Time
11.Splitting Local Time
12.localtime converts a time into the local time.
13.gmtime function converts a time value into Greenwich Mean Time