in reply to Message threading
# Get the data and store it in a message hash while (<DATA>) { chomp; my ($id, $parent, $from, $date, $content) = split /,/; $msg->{$id} = { # id => $id, # only if you feel it's necessary thread => $parent, from => $from, date => $date, content => $content, child => [], }; push @{ $msg->{$parent}[child] }, $id; # or even # push @{ $msg->{$parent}[child] }, $msg->{$id} # to save time/work/effort/etc # but then it might be necessary to store the id # in the hash itself }
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
|
|---|