There some sort of regexp strangeness going on here that I can't grok.
Your script doesn't work for me unless I print out the values of $1 AND $2. 
If I just print out one it doesn't work either.

turner:~$ cat foo.pl
$_ = "UA-UI1,3,4,6";
m~(..)\-(..)(\d.+)~;
for $CC( $1 .. $2 ) { for $n ( split /,/, $3 ) { print "$CC$n "} }
turner:~$ perl foo.pl
01 03 04 06 turner:~$ 

But oddly, it works if I add a little debuging:

turner:~$ cat foo.pl
$_ = "UA-UI1,3,4,6";
m~(..)\-(..)(\d.+)~;
print "$1, $2\n";
for $CC( $1 .. $2 ) { for $n ( split /,/, $3 ) { print "$CC$n "} }
turner:~$ perl foo.pl
UA, UI
UA1 UA3 UA4 UA6 UB1 UB3 UB4 UB6 UC1 UC3 UC4 UC6 UD1 UD3 UD4 UD6 UE1 UE3 UE4 UE6
UF1 UF3 UF4 UF6 UG1 UG3 UG4 UG6 UH1 UH3 UH4 UH6 UI1 UI3 UI4 UI6 turner:~$

-- 
Andy <[EMAIL PROTECTED]> - http://anime.mikomi.org/ - Community Anime Reviews
   'Course, that doesn't work when 'a' contains parentheses.
                -- Larry Wall in <[EMAIL PROTECTED]>

Reply via email to