PERL:


PERL: - . 114


# $delta = $now - $then,

printf %-20 20s %-20 20s %s , $from, $by, fmtdate($now), Sprevfrom = $by puttime($delta), $then = $now, }

exit,

rf>


11? 3 1.3 ()

# sub getdate {

my Sstring = shift,

$stnng =" s/\s+\( *\)\s*$//, #

#

my $date = ParseDate($stnng)

my $epoch_secs = UmxDate($date %s ),

return $epoch_secs,

# sub fmtdate {

my Sepoch = shift,

my($sec, $mm, $hour, $mday, $mon, $year) = localtime($epoch), return sprintf %02d %02d %02d %04d/%02d/%02d Shour, $mm, $sec, $year + 1900, $mon + 1, $mday,

# sub puttime {

fny($seconds) = shift,

my($days, Shours, Sminutes),

$days = pull_count($seconds 24 * 60 * 60),

Shours = puli_count($seconds 60 - 60),

Smmutes = pull_count($seconds 60)

put_field('s' $seconds),

put_field('n', $mmutes)

put_field('h , Shours),

put_field('d', $days)

print \n ,

#  $count = pull_count(seconds, amount)

#  seconds amount


sub pull_count {

my(Sanswer) = mt($_[0] / $_[1]), $_[0] -= Sanswer . $_[1], return Sanswer,

#  put_field(char, number)

#  3 char
(char == s )

sub put_field {

my ($char, Snumber) = @_,


3.11. : hopdelta 113

printf %3d%s , Snumber, $char if $numbet |[ $char eq 's',

Sender

Recipient

Time

Delta

Start

wall.org

09:17:12

1998/05/23

44s 3m

wall.org

mail.brainstorm.net

09:20:56

1998/05/23

mail.brainstorm.net

ihereg.perl.com

09:20:58

1998/05/23

2s




,




- -  - -  - -