Thread localtime - Datum an Variable übergeben (10 answers)
Opened by jan99 at 2015-03-11 11:12

GwenDragon
 2015-03-16 10:19
#180156 #180156
User since
2005-01-17
14746 Artikel
Admin1
[Homepage]
user image
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl

use strict; 
use warnings;

use 5.010;
use POSIX;
use Time::localtime ();

my %config = ( logfilename => 'ox.log' );
my $dayfolder = $config{logfilename}."\\".POSIX::strftime("%Y-%m-%d", localtime);
print $dayfolder;

Geht bei mir und erzeugt:
ox.log\2015-03-16

//EDITH:
Ach so, ja, Time::localtime wird ja verwendet.
Dann muss,um nicht CORE::localtime zu überschreiben eben eine leere Luiste ans use dran.

https://metacpan.org/pod/Time::localtime#DESCRIPTION
To access this functionality without the core overrides, pass the use an empty import list, and then access function functions with their full qualified names. On the other hand, the built-ins are still available via the CORE:: pseudo-package.

Last edited: 2015-03-16 10:49:33 +0100 (CET)

View full thread localtime - Datum an Variable übergeben