You could try making an array or hash with the months(I used an array because the index is already numeric):
@mons = ('Nul','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','De c'); #convert the date $threeLetterMonth = $mons[$record->{month}]; -----Original Message----- From: Brian Johnson [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 9:20 AM To: [EMAIL PROTECTED] Subject: More string manipulation 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] -------------------------------------------------------------------------------- This email may contain confidential and privileged material for the sole use of the intended recipient. If you are not the intended recipient, please contact the sender and delete all copies. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]