On Mon, Jul 20, 2015 at 6:19 AM, Vincent Lequertier wrote:
> Thank you for the help, Charles! Unfortunately, I'm not able to figure out
> how to access the element of %ordered, despite some diggings in the perldoc
> (http://perldoc.perl.org/perldsc.html).
> I can print a single element with print
Thank you for the help, Charles! Unfortunately, I'm not able to figure
out how to access the element of %ordered, despite some diggings in the
perldoc (http://perldoc.perl.org/perldsc.html).
I can print a single element with print
$ordered{'xxx.xxx.xxx.xxx'}[0]{'[15/Jul/2015:10:30:03 +0200]'}{ac
> Hi,
>
> I have the following structure :
>
> $hash{$date} = {
> 'ip' => $ip,
> 'action' => $action,
> };
>
> witch produce data like :
>
> $VAR1 = '[15/Jul/2015:10:30:03 +0200]';
> $VAR2 = {
>'ip' => 'xxx.xxx.xxx.x
Thank you, I thought about transforming my hash like your function
transform_date_logs_to_ip_logs does but didn't found the way. I'm now
trying to understand exactly how that works :-)
--
Vincent Lequertier
vincentlequertier.tk
Le 2015-07-17 16:40, Brandon McCaig a écrit :
Vincent:
On Fri,
Hi Vincent,
On Mon, 20 Jul 2015 09:18:33 +0200
Vincent Lequertier wrote:
> Thank you for the help, but this does not work. We needa pass the ip
> addresses to the sorting function, because actually the keys of the hash
> are the dates
>
> $VAR1 = '[15/Jul/2015:10:30:03 +0200]';
> $VAR2 = {
>
Why you don't want rebuild you hash into another hash with ip address as a
key?
Yes, it will cost you additional memory and runtime but it will be more
convenient and easy to understand, support and modificate. If memory is not
a problem, i think it's best choice in your case.
See https://gist.gi
Thank you for the help, but this does not work. We needa pass the ip
addresses to the sorting function, because actually the keys of the hash
are the dates
$VAR1 = '[15/Jul/2015:10:30:03 +0200]';
$VAR2 = {
'ip' => 'xxx.xxx.xxx.xxx',
'action' => 'GET xxx'
};
T