in reply to Re^3: Find If Value Exists In Array Of Hashes
in thread Find If Value Exists In Array Of Hashes

It's a long time since I wrote any perl :( Correction
use strict; use warnings; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); my $stamp = sprintf "%02d/%02d/%02d %02d.%02d.%02d", $year +1900, $mon +1 , $mday, $hour, $min, $sec; print STDOUT $stamp;
Output 2014/08/12 10.24.56

Replies are listed 'Best First'.
Re^5: Find If Value Exists In Array Of Hashes
by SirClive (Scribe) on Aug 12, 2014 at 09:38 UTC
    Ah yes - as I said it is a long time since I used perl and even longer since I used 'C' :) :) This is better
    use strict; use warnings; use POSIX qw(strftime); my $date = strftime("%Y/%m/%d %H:%M:%S\n", localtime(time)); print $date;
    Output 2014/08/12 10:36:29

      Thanks, SirClive!! I never think of things like "strftime" or whatever... appreciate the reminder!! Will look into that tomorrow...