Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^4: Find If Value Exists In Array Of Hashes

by SirClive (Scribe)
on Aug 12, 2014 at 09:28 UTC ( [id://1097091]=note: print w/replies, xml ) Need Help??


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...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1097091]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-03-28 21:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found