mail header split



Hi all

I have an email To field that I want regex on

The email is as so:

76867487489-bookings@xxxxxxxxxx

Im trying to get the number before the hyphen.

Currently I have it as so

my ($bookrefNumber, $discard) = split('-',$pop3MailContent{'To'});

but I dont like this method.

If anyone has a nice elegant method / solution it would great fully be appreciated.

Kind Regards
Brent Clark
.