in reply to Re: Module Code Review
in thread Module Code Review
You don't even need Time::Local,
or, just for fun:my $yesterday= do { my($y,$m,$d)= (localtime( time-60*60*(12+(localtime)[2]) ))[5,4,3]; sprintf "%04d-%02d-%02d", 1900+$y, 1+$m, $d; };
- tye (but my friends call me "Tye")my $yesterday= join"-",mapcar{sprintf "%0".shift()."d",pop()+pop()} [4,2,2],[(localtime( time-60*60*(12+(localtime)[2]) ))[5,4,3]],[1900,1,0];
|
|---|