Cannot print System Local Time with use Time::localtime function in Perl -


I have written a Perl script to get specific information from the config file

  Time: Local time; My $ date_string = ctime (stat ($ filepath) - & gt; mtime); Print "$ date_string \ t";  

The above code prints the last modified time and file date, but the problem is that I could not print the report generation time with the following function

 < Code> my $ time = local time; # Scaler reference print "successfully executed at $ time \ n";  

I get the following error

  successfully executed on time: tm = ARRAY (0x336e048)  

The module overrides the default export core localtime () function, replacing it with the version that gives "Time :: TM" objects

So if you want to use core pearl locality, type in this way:

  my $ time = CORE :: local time;  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -