summaryrefslogtreecommitdiff
path: root/Bugs/assignglob
blob: f36e9e21504a11febb47b821c174c104fd9003d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!./perl

#!/usr/bin/perl
$month = (split(' ',`date`))[1];

while (<DATA>) {
    next if 1 .. ?^$month\b?o;
    next unless /deposit/;
    ($day) = /(\d+)/;
    local(*where) = m:([^/]+)$:;
    # with the local, you get bad free's.  with it, you get a core dump
    $where{$day}++;
}

@days = sort { $a <=> $b } keys %personal;

foreach $place ('tivoli', 'lists', 'personal') {
    *where = $place;
    foreach $day (@days) {
        printf "Aug %02d: %3d in %s\n", $day, $where{$day}, $place;
    }
}

__END__
Aug 27 10:40:20 New mail from hess
Aug 27 10:40:20 deposit into /home/wraeththu/tchrist/Mail/in.coming/tivoli
Aug 27 10:42:27 New mail from jcarson
Aug 27 10:42:27 deposit into /home/wraeththu/tchrist/Mail/in.coming/tivoli
Aug 27 10:48:18 New mail from dean
Aug 27 10:48:18 deposit into /home/wraeththu/tchrist/Mail/in.coming/tivoli
Aug 27 11:05:56 New mail from hess
Aug 27 11:05:56 deposit into personal
Aug 27 11:13:28 New mail from hess
Aug 27 11:13:28 deposit into personal