in reply to lowercasing during a match?
/e can be your friend. Try this: $raw =~ s/(\S+?)\s*=\s*(\S+)/$params{lc($1)} = $2/ge; It's destructive on $raw, but that's easy enough to work around if you care.