Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: How to check last used date.

by tybalt89 (Monsignor)
on Mar 12, 2021 at 22:08 UTC ( [id://11129539]=note: print w/replies, xml ) Need Help??


in reply to How to check last used date.

#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11129526 use warnings; use List::Util qw( maxstr ); my %last; /^(9\d+).*?(\S+T\S+)/ and $last{$1} = maxstr $last{$1} // '', $2 while <DATA>; use Data::Dump 'dd'; dd \%last; __DATA__ @array1 @array3 @array2 @arra3 900000001 900000001 Network1 Login 900000002 900000002 Network1 2019-11-07T20:31:10.000Z 900000002 900000002 Network1 2021-02-19T13:47:25.000Z 900000002 900000002 Network1 2021-03-10T13:58:50.000Z 900000003 NOT Registered No Network1 NOT Registered 900000004 900000004 Network1 Login 900000005 900000005 Network1 Login 900000006 900000006 Network1 Login2 900000007 900000007 Network1 2021-03-10T17:11:24.000Z 900000007 900000007 Network1 2021-02-18T08:34:58.000Z 900000007 900000007 Network1 2021-01-25T17:19:44.000Z

Outputs:

{ 900000002 => "2021-03-10T13:58:50.000Z", 900000007 => "2021-03-10T17:11:24.000Z", }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-25 19:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found