I am writing an email script which is called with a $sender and $recipient variable. It then runs one of several commands based on a pattern in the $recipient variable (eg... user-spam@test.com or user-ham@test.com). Because I use the un-altered email address to track statistics I need to strip the -spam and -ham part out and pass the result on as a variable for use later in the script. Any thoughts?
-stephen