in reply to Capturing unknown number of matches

You have two captures, so you'll two results. You need two steps.
my ($days) = /BYDAY=([A-Z]+(?:,[A-Z]+)*);/; my @days = split(/,/, $days);

Same, as one expression:

my @days = split(/,/, ( /BYDAY=([A-Z]+(?:,[A-Z]+)*);/ )[0]);

Going the other way, a more generic parser:

$_ = 'FREQ=WEEKLY;BYDAY=TU,TH;UNTIL=20110429T000000;WKST=SU'; my %attrs; for (split /;/) { my ($k,$v) = split /=/; $attrs{$k} = $v; } my @days = split /,/, $attrs{BYDAY};