On Jan 27, 2014, at 11:32 PM, Luca Ferrari wrote:
> Hi all,
> often I find myself writing something like the following to get the
> "human" date:
>
> my ($day, $month, $year) = (localtime())[3..5];
> $month++, $year += 1900;
> print "\nToday is $month / $day / $year \n";
>
>
> I was wondering
On Jan 28, 2014, at 8:59 PM, Rob Dixon wrote:
> It is probably best to use the Time::Piece module, which has been part of
> core Perl 5 since version 10
Side question: does anyone know why the Perl team chose Time::Piece
over Date::Time to be bundled with Perl? I've known about Date::Ti
On Wed, Jan 29, 2014 at 5:59 AM, Rob Dixon wrote:
> It is probably best to use the Time::Piece module, which has been part of
> core Perl 5 since version 10 so you shouldn't need to install it.
>
Thanks, I was not aware of it. And it does what I need.
Luca
--
To unsubscribe, e-mail: beginners-
On 28/01/2014 07:32, Luca Ferrari wrote:
Hi all,
often I find myself writing something like the following to get the
"human" date:
my ($day, $month, $year) = (localtime())[3..5];
$month++, $year += 1900;
print "\nToday is $month / $day / $year \n";
I was wondering if there's a smarter pattern
On Tue, 28 Jan 2014 08:32:20 +0100
Luca Ferrari wrote:
> Hi all,
> often I find myself writing something like the following to get the
> "human" date:
>
> my ($day, $month, $year) = (localtime())[3..5];
> $month++, $year += 1900;
> print "\nToday is $month / $day / $year \n";
>
>
> I was wonde
On 2014-01-28 08:32, Luca Ferrari wrote:
often I find myself writing something like the following to get the
"human" date:
my ($day, $month, $year) = (localtime())[3..5];
$month++, $year += 1900;
print "\nToday is $month / $day / $year \n";
I was wondering if there's a smarter pattern to get
hi
If you would like to work with a cleaner perl, try:
http://search.cpan.org/~mschwern/perl5i-v2.12.0/lib/perl5i.pm it is slower
but it is beautiful.
other way is to use Classes like DateTime directly
Best Regards
MArcos
On Tue, Jan 28, 2014 at 8:32 AM, Luca Ferrari wrote:
> Hi all,
> ofte
Hi Luca,
Check this:
http://stackoverflow.com/questions/11020812/todays-date-in-perl-in-mm-dd--format
On 28 January 2014 13:02, Luca Ferrari wrote:
> Hi all,
> often I find myself writing something like the following to get the
> "human" date:
>
> my ($day, $month, $year) = (localtime())[3
Hi all,
often I find myself writing something like the following to get the
"human" date:
my ($day, $month, $year) = (localtime())[3..5];
$month++, $year += 1900;
print "\nToday is $month / $day / $year \n";
I was wondering if there's a smarter pattern to get the right value in
one single line.