inz
tbunread.perl (raw)
#!/usr/bin/perl -w
use strict;
sub urc {
my $rv = 0;
while (my $r = <$fd>) {
$rv = $1 if $r =~ /\[-?1:\^9F[^\]]*?\(\^A2=([0-9]+)\)/m;
}
}
chdir(<$ENV{'HOME'}/.thunderbird
/*.default
>); open my $tail, "-|", "tail", "-n", 0, "-f", <*/*/*.msf
>; my %urcs = map { $_ => urc
($_) } <*/*/*.msf
>; my $fn;
print "$_: ", $urcs{$_}, "\n" if $urcs{$_}; }
$/ = "}\@\n";
while (<$tail>) {
$fn = $1 if (/.*(?:^|\n)==> (.*) <==\n/s);
while (/\[-?1:\^9F[^\]]*?\(\^A2=([0-9]+)\)/g) {
next if $urcs{$fn} eq $1;
$urcs{$fn} = $1;
}
}