#!/usr/bin/perl #################################################### #################################################### #################################################### use Storable qw/store retrieve/; #################################################### # my's #################################################### my $debug=1; my $this_time_stamp=`/bin/date +%s%3N`; #Epoch time in milliseconds chomp($this_time_stamp); my $run_time_file="/var/tmp/mysample_last_run_timestamp.dat"; # File to save into ################################################################ # Main ################################################################ retrieve_last_run_timestamp(); save_this_run_time_stamp(); ################################################################ # Save this run time stamp ################################################################ sub save_this_run_time_stamp { if (defined $this_time_stamp) { print "DEBUG: SAVING : This time stamp = $this_time_stamp \n" if ($debug); defined store \$this_time_stamp, $run_time_file or die( "could not save time to '$run_time_file'\n" ); print "DEBUG: SAVED : saved this run time file data: $run_time_file\n" if ($debug); } else { print "ERROR: no last time stamp to save.\n" if ($debug); } } ################################################################ # Retrieve last run timestamp ################################################################ sub retrieve_last_run_timestamp { if ( -e $run_time_file ) { print "DEBUG: RETRIEVING: reading in last run time file data: $run_time_file\n" if ($debug); $last_run_time = $ {retrieve $run_time_file} ; print "DEBUG: RETRIEVED: Last run time stamp = $last_run_time\n" if ($debug); } else { print "DEBUG: No last run time file for $log_file\n"; } }
Sample Perl script for saving and retrieving last run time stamps
-
The "too privileged to wear a mask" girl
I can't post this on Facebook because it has too many words in it that would trigger FB's censorship bots. Tonight, before going to the gym, I…
-
Apparently you can not say "dirty woman" on Facebook either
Taken from a friends FB violation, apparently you can not say "dirty woman" either or that will trigger the FB Censorship bots.
-
On Cancel Culture: Why hasn't Disney been canceled?
(( I'm writing this over here on LJ because it has too many "keywords" that could trigger the Censorship Bots over on Facebook. ))…
- Post a new comment
- 0 comments
- Post a new comment
- 0 comments