ramki067 has asked for the wisdom of the Perl Monks concerning the following question:
Thanks$tme=localtime(); my ($d,$m,$y) = (localtime)[3,4,5]; my $mdy1 = sprintf '%d-%d-%d', $d, $m+1, $y+1900; print "\nDate is:$mdy1\n"; if ($mdy1 eq "0-3-2015") {$mdy1 = "28-2-2015";} print "\nDate is:$mdy1\n"; $LOGFILE = "7252_Widevine_OemCrypto_Consolelog_User1"; $CONSOLE_LOGFILE = $LOGFILE.'_'.$mdy1.'.txt'; open CONSOLE_LOGF, ">", $CONSOLE_LOGFILE or die "Cannot open Console l +ogfile $CONSOLE_LOGFILE:$!"; system("pwd"); # Doing some operations here. close(CONSOLE_LOGF); $tme=localtime(); ($d,$m,$y) = (localtime)[3,4,5]; #my $mdy2 = sprintf '%d-%d-%d', $d-1, $m+1, $y+1900; my $mdy2 = sprintf '%d-%d-%d', $d, $m+1, $y+1900; print "\nDate is:$mdy2\n"; $LOGFILE1 = "7252_Widevine_OemCrypto_Consolelog_User1"; $CONSOLE_LOGFILE = $LOGFILE1.'_'.$mdy2.'.txt'; open(CONSOLE_LOGF, ">>", $CONSOLE_LOGFILE) || die "Cannot open Console + logfile $CONSOLE_LOGFILE: $!"; # ........... Here is where the previous contents are erased and new f +ile is created with new time(date is same here)..... system("pwd"); # Doing some operations here. close(CONSOLE_LOGF);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File append not working. Any help?
by choroba (Cardinal) on Jun 09, 2015 at 07:02 UTC | |
|
Re: File append not working. Any help?
by Anonymous Monk on Jun 09, 2015 at 06:58 UTC | |
by ramki067 (Acolyte) on Jun 09, 2015 at 08:20 UTC | |
by Anonymous Monk on Jun 09, 2015 at 09:10 UTC | |
|
Re: File append not working. Any help?
by james28909 (Deacon) on Jun 09, 2015 at 07:15 UTC | |
|
Re: File append not working. Any help?
by sandy105 (Scribe) on Jun 09, 2015 at 08:58 UTC | |
by Anonymous Monk on Jun 09, 2015 at 10:18 UTC | |
|
Re: File append not working. Any help?
by Hosen1989 (Scribe) on Jun 09, 2015 at 19:02 UTC |