Split string on multiple character delimeters

From: Aaron DeLoach (aaron_at_deloachcorp.com)
Date: 02/24/04


Date: Tue, 24 Feb 2004 13:53:07 -0600

I am trying to split a string based on a multiple character delimiter and
place it into a hash. After a few hours I came up with the following:

my $str = "color%=red%;lang%=engl";
my %hash = split /%;|%=/, $str, -2;

It works, but I would like to know if it's the right method :-)