I have the following code that I need a little advice on.

The $record->{month} returns the month in integer format (ie 1, 2, 3), I
need to change it to to a three letter string (ie Jan, Feb, Mar)

  foreach $item (@items) {
    my $record;
    my $test;
    foreach $record (@{$PDB->{records}}) {
      # look for date, from, or subject
      # XXX add date/time check
      # Skip everything except the Inbox folder
      next if ($record->{category} ne $cat);
      my $emaildate = "$record->{day} $record->{month} $record->{year}
$record->{hour}:$record->{minute}";
      if ( $record->{subject} eq $item->{Subject} &&
           $record->{from} eq $item->{From} &&
           $item->{Date} =~ $emaildate) {
#        do something
        if( $record->{is_read} ne $item->{is_read}) {
          $record->{is_read} = $item->{is_read};
          $record->{attributes}{dirty}=1;
        }
      }
    }
  }


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to